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

21 lines
477 B
YAML
Raw Normal View History

2019-09-18 21:38:32 +00:00
---
- 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