mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-07-01 23:48:32 +02:00
renamed customer user group
This commit is contained in:
0
roles/hosts/files/hosts
Normal file
0
roles/hosts/files/hosts
Normal file
5
roles/hosts/handlers/main.yml
Executable file
5
roles/hosts/handlers/main.yml
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
- name: restart_docker
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: docker.service
|
||||||
|
state: restarted
|
||||||
|
become: true
|
18
roles/hosts/tasks/main.yml
Executable file
18
roles/hosts/tasks/main.yml
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
- name: Hosts
|
||||||
|
become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"
|
||||||
|
block:
|
||||||
|
- name: Reconfigure hosts file
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: "/etc/hosts"
|
||||||
|
regexp: "^192.168.77.101 .*"
|
||||||
|
line: "192.168.77.101 m-server m-server.home.lan"
|
||||||
|
- name: Reconfigure hosts file
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: "/etc/hosts"
|
||||||
|
regexp: "^192.168.77.106 .*"
|
||||||
|
line: "192.168.77.106 nas nas.home.lan"
|
||||||
|
- name: Reconfigure hosts file
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: "/etc/hosts"
|
||||||
|
regexp: "^192.168.77.238 .*"
|
||||||
|
line: "192.168.77.238 rpi5 rpi5.home.lan"
|
Reference in New Issue
Block a user