1
0
Fork 0
This repository has been archived on 2020-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-role-wireguard/molecule/default/playbook.yml
2019-10-04 21:05:17 +02:00

21 lines
477 B
YAML

---
- name: Prepare
hosts: all
become: true
tasks:
- name: Add the inventory into /etc/hosts
lineinfile:
dest: /etc/hosts
regexp: '.*{{ item }}$'
line: "{{ hostvars[item]['ansible_enp0s8']['ipv4']['address'] }} {{item}}"
state: present
when: hostvars[item]['ansible_enp0s8']['ipv4']['address'] is defined
with_items:
- "{{ groups['all'] }}"
- name: Test
hosts: all
become: true
roles:
- role: ansible-role-wireguard