moved editing the hosts file to role server
because only servers might be outside the home network and connect with wireguard
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
tags: always
|
||||
|
||||
- block:
|
||||
- import_tasks: system_setup/hosts.yml
|
||||
- include_tasks: utilities/netdata.yml
|
||||
when: netdata is defined and netdata == true
|
||||
- include_tasks: utilities/snmpd.yml
|
||||
|
||||
12
roles/server/tasks/system_setup/hosts.yml
Normal file
12
roles/server/tasks/system_setup/hosts.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- name: system setup | /etc/hosts | populate
|
||||
lineinfile:
|
||||
path: "/etc/hosts"
|
||||
line: "{{ item.ip }} {{ item.fqdn }}"
|
||||
mode: '0644'
|
||||
owner: 'root'
|
||||
group: 'root'
|
||||
loop:
|
||||
- { ip: '192.168.1.240', fqdn: 'gitlab.social.my-wan.de'}
|
||||
when:
|
||||
- set_hosts is defined
|
||||
- set_hosts == true
|
||||
Reference in New Issue
Block a user