2023-09-05 23:35:08 +00:00
|
|
|
- name: Setup Software
|
2023-09-04 18:59:57 +00:00
|
|
|
hosts: joplin
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
2023-09-05 23:42:08 +00:00
|
|
|
- name: Wait for connection
|
2023-09-10 22:57:43 +00:00
|
|
|
ansible.builtin.ping:
|
2023-09-10 23:07:56 +00:00
|
|
|
ignore_unreachable: true
|
2023-09-10 22:57:43 +00:00
|
|
|
register: wait_conn
|
|
|
|
retries: 30
|
|
|
|
delay: 10
|
|
|
|
until: wait_conn.ping is defined
|
|
|
|
# ansible.builtin.wait_for:
|
|
|
|
# host: "{{ inventory_hostname }}"
|
|
|
|
# port: 22
|
|
|
|
# timeout: 300
|
|
|
|
# delegate_to: localhost
|
2023-09-10 23:16:16 +00:00
|
|
|
- name: Debug
|
|
|
|
ansible.builtin.debug:
|
|
|
|
var: wait_conn
|
2023-09-04 18:59:57 +00:00
|
|
|
- name: Test some stuff
|
|
|
|
ansible.builtin.shell: |
|
|
|
|
touch ~/hmm
|
|
|
|
echo test > ~/test
|
|
|
|
echo test2 >> ~/test
|
2023-09-08 22:58:04 +00:00
|
|
|
mkdir ~/dir
|
|
|
|
touch ~/dir/testing
|
|
|
|
- name: Install some stuff
|
|
|
|
ansible.builtin.apt:
|
|
|
|
update_cache: true
|
|
|
|
name: qemu-guest-agent
|
|
|
|
- name: Enable some stuff
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: qemu-guest-agent
|
|
|
|
state: started
|
|
|
|
enabled: true
|