add: ansible test playbook
This commit is contained in:
30
ansible/test.yml
Normal file
30
ansible/test.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
- 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 }}"
|
||||
|
||||
Reference in New Issue
Block a user