31 lines
653 B
YAML
31 lines
653 B
YAML
- name: Semaphore connectivity test
|
|
hosts: all
|
|
become: true
|
|
|
|
tasks:
|
|
- name: Print whoami
|
|
command: whoami
|
|
register: whoami_output
|
|
|
|
- name: Show whoami result
|
|
debug:
|
|
msg: "Running as user: {{ whoami_output.stdout }}"
|
|
|
|
- name: Print hostname
|
|
command: hostname
|
|
register: hostname_output
|
|
|
|
- name: Show hostname
|
|
debug:
|
|
msg: "Host name is: {{ hostname_output.stdout }}"
|
|
|
|
- name: Check docker is available
|
|
command: docker --version
|
|
register: docker_output
|
|
changed_when: false
|
|
|
|
- name: Show docker version
|
|
debug:
|
|
msg: "{{ docker_output.stdout }}"
|
|
|