Louis Abel
1be345119f
* Provide most options for nebula config * Provide ability for future modifications to use other distros * Provide information on usable variables in README
32 lines
816 B
YAML
32 lines
816 B
YAML
---
|
|
- name: Check that nebula hosts are not empty
|
|
hosts: localhost
|
|
any_errors_fatal: true
|
|
tasks:
|
|
- name: Check for one host
|
|
ansible.builtin.assert:
|
|
that: (groups['nebula'] | default([])) | length > 0
|
|
fail_msg: "No hosts configured. Ending test."
|
|
success_msg: "There are hosts found in the group."
|
|
|
|
- name: Setup nebula
|
|
hosts: nebula
|
|
strategy: free
|
|
become: true
|
|
roles:
|
|
- rockylinux.nebula
|
|
|
|
- name: Verify they can ping
|
|
hosts: nebula
|
|
strategy: free
|
|
tasks:
|
|
- name: Ping all nebula hosts
|
|
ansible.builtin.command: "ping -W 1 -c 3 {{ hostvars[item]['nebula_ip'].split('/')[0] }}"
|
|
changed_when: "1 != 1"
|
|
register: ping_check
|
|
until: ping_check is succeeded
|
|
retries: 15
|
|
delay: 10
|
|
loop: "{{ ansible_play_hosts_all }}"
|
|
...
|