2023-09-13 05:33:44 +02:00
|
|
|
---
|
|
|
|
- name: Setup CI/CD Runner
|
|
|
|
hosts: localhost
|
|
|
|
become: true
|
|
|
|
become_user: root
|
|
|
|
tags:
|
|
|
|
- always
|
|
|
|
tasks:
|
|
|
|
- name: Add VPN IPs to /etc/hosts
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/hosts
|
|
|
|
regexp: "^{{ item }}\\s"
|
|
|
|
line: "{{ hostvars[item]['wg_addr'] | mandatory }} {{ item }}"
|
2023-09-13 05:38:17 +02:00
|
|
|
unsafe_writes: true # Docker does not allow atomic updates here.
|
2023-09-13 05:33:44 +02:00
|
|
|
state: present
|
|
|
|
loop: "{{ groups['all'] }}"
|
|
|
|
|
|
|
|
...
|
|
|
|
# vim: ft=yaml.ansible
|