37 lines
965 B
YAML
37 lines
965 B
YAML
- name: Setup Software
|
|
hosts: joplin
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Wait for connection
|
|
ansible.builtin.ping:
|
|
ignore_unreachable: true
|
|
register: wait_conn
|
|
retries: 30
|
|
delay: 10
|
|
until: wait_conn.ping is defined
|
|
failed_when: wait_conn.ping is not defined
|
|
# ansible.builtin.wait_for:
|
|
# host: "{{ inventory_hostname }}"
|
|
# port: 22
|
|
# timeout: 300
|
|
# delegate_to: localhost
|
|
- name: Debug
|
|
ansible.builtin.debug:
|
|
var: wait_conn
|
|
- name: Test some stuff
|
|
ansible.builtin.shell: |
|
|
touch ~/hmm
|
|
echo test > ~/test
|
|
echo test2 >> ~/test
|
|
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
|