Switch network to update to live system
This commit is contained in:
parent
c1480a8403
commit
d8c901424c
@ -1,4 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- network
|
10
main.yml
10
main.yml
@ -24,9 +24,13 @@
|
||||
# roles:
|
||||
# - docker
|
||||
|
||||
- hosts: uatu.lan
|
||||
roles:
|
||||
#- hosts: uatu.lan
|
||||
# roles:
|
||||
# - ssh
|
||||
# - ubuntu
|
||||
# - docker
|
||||
- duplicity
|
||||
# - duplicity
|
||||
|
||||
- hosts: node-01.lan
|
||||
roles:
|
||||
- network
|
@ -1,12 +1,17 @@
|
||||
---
|
||||
- name: create build directory
|
||||
- name: create directory
|
||||
file:
|
||||
path: build/dhcp
|
||||
path: /srv/dhcp/config
|
||||
state: directory
|
||||
|
||||
- name: Create dhcpd.conf
|
||||
become: yes
|
||||
template:
|
||||
src: etc/dhcpd/dhcpd.conf.j2
|
||||
dest: build/dhcp/dhcpd.conf
|
||||
dest: /srv/dhcp/config/dhcpd.conf
|
||||
vars:
|
||||
network: "{{ lan }}"
|
||||
|
||||
- name: restart container
|
||||
shell:
|
||||
cmd: docker service update --force --detach dhcp
|
||||
|
@ -1,41 +1,41 @@
|
||||
---
|
||||
- name: create build directory
|
||||
- name: create dns directory
|
||||
file:
|
||||
path: build/dns
|
||||
path: /srv/bind/config
|
||||
state: directory
|
||||
|
||||
- name: Create db lan
|
||||
# become: yes
|
||||
template:
|
||||
src: etc/bind/db.lan.j2
|
||||
dest: build/dns/db.lan
|
||||
dest: /srv/bind/config/db.lan
|
||||
vars:
|
||||
network: "{{ lan }}"
|
||||
serial: "{{ ansible_date_time.year }}{{ ansible_date_time.month }}{{ ansible_date_time.day }}02"
|
||||
|
||||
- name: Create reverse db lan
|
||||
# become: yes
|
||||
template:
|
||||
src: etc/bind/db.reverse.j2
|
||||
dest: build/dns/db.{{ lan.network_reverse }}
|
||||
dest: /srv/bind/config/db.{{ lan.network_reverse }}
|
||||
vars:
|
||||
network: "{{ lan }}"
|
||||
serial: "{{ ansible_date_time.year }}{{ ansible_date_time.month }}{{ ansible_date_time.day }}02"
|
||||
|
||||
- name: Create db iot
|
||||
# become: yes
|
||||
template:
|
||||
src: etc/bind/db.lan.j2
|
||||
dest: build/dns/db.iot
|
||||
dest: /srv/bind/config/db.iot
|
||||
vars:
|
||||
network: "{{ iot }}"
|
||||
serial: "{{ ansible_date_time.year }}{{ ansible_date_time.month }}{{ ansible_date_time.day }}02"
|
||||
|
||||
- name: Create reverse db iot
|
||||
# become: yes
|
||||
template:
|
||||
src: etc/bind/db.reverse.j2
|
||||
dest: build/dns/db.{{ iot.network_reverse }}
|
||||
dest: /srv/bind/config/db.{{ iot.network_reverse }}
|
||||
vars:
|
||||
network: "{{ iot }}"
|
||||
serial: "{{ ansible_date_time.year }}{{ ansible_date_time.month }}{{ ansible_date_time.day }}02"
|
||||
|
||||
- name: restart container
|
||||
shell:
|
||||
cmd: docker service update --force --detach bind
|
||||
|
@ -1,4 +1,6 @@
|
||||
---
|
||||
- import_tasks: dns-file.yml
|
||||
become: yes
|
||||
|
||||
- import_tasks: dhcp-file.yml
|
||||
become: yes
|
||||
|
Loading…
Reference in New Issue
Block a user