update nameserver playbook to setup for debian bullseye, and add new cubox to inventory
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: bootstrap
|
- name: bootstrap
|
||||||
hosts: cubox-m
|
hosts: managed
|
||||||
# remote_user: ansible
|
# remote_user: ansible
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
# become: true
|
# become: true
|
||||||
@@ -94,10 +94,14 @@
|
|||||||
- name: remove {{item}} user if it exists
|
- name: remove {{item}} user if it exists
|
||||||
command: userdel -rf {{item}}
|
command: userdel -rf {{item}}
|
||||||
become: true
|
become: true
|
||||||
become_user: ansible
|
|
||||||
args:
|
args:
|
||||||
removes: /home/{{item}}/.bashrc
|
removes: /home/{{item}}/.bashrc
|
||||||
loop:
|
loop:
|
||||||
- debian
|
- debian
|
||||||
- ubuntu
|
- ubuntu
|
||||||
|
|
||||||
|
- name: fix bullseye-security
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: /etc/apt/sources.list
|
||||||
|
regexp: '(\s+)bullseye\/updates(\s+.*)?$'
|
||||||
|
replace: '\1bullseye-security\/updates\2'
|
||||||
|
|||||||
@@ -1,10 +1,18 @@
|
|||||||
---
|
---
|
||||||
# create cronjob to set dynamic ip
|
# create cronjob to set dynamic ip
|
||||||
|
|
||||||
|
- name: Install required packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: latest
|
||||||
|
with_items:
|
||||||
|
- cron
|
||||||
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: create zone edit cronjob
|
- name: create zone edit cronjob
|
||||||
cron:
|
cron:
|
||||||
name: zoneedit
|
name: zoneedit
|
||||||
minute: "*/30"
|
minute: "*/45"
|
||||||
user: root
|
user: root
|
||||||
job: 'IP=`curl -s http://api.ipify.org` && wget -O - --http-user=rmorgan15 --http-passwd=D422B334D3768ACD "https://dynamic.zoneedit.com/auth/dynamic.html?host=test.xai-corp.net&dnsto=$IP" &>/dev/null'
|
job: 'IP=`curl -s http://api.ipify.org` && wget -O - --http-user=rmorgan15 --http-passwd=D422B334D3768ACD "https://dynamic.zoneedit.com/auth/dynamic.html?host=test.xai-corp.net&dnsto=$IP" &>/dev/null'
|
||||||
cron_file: zoneedit
|
cron_file: zoneedit
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ dkhost05 IN A 192.168.4.55
|
|||||||
ns IN A 192.168.4.11
|
ns IN A 192.168.4.11
|
||||||
ns01 IN CNAME ns
|
ns01 IN CNAME ns
|
||||||
ns02 IN CNAME cubox-i
|
ns02 IN CNAME cubox-i
|
||||||
|
ns03 IN CNAME cubox-m
|
||||||
|
|
||||||
; gluster servers
|
; gluster servers
|
||||||
;gluster IN A 192.168.4.11
|
;gluster IN A 192.168.4.11
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ $ORIGIN 4.168.192.IN-ADDR.ARPA.
|
|||||||
103 IN PTR xaicorp1.xai-corp.net.
|
103 IN PTR xaicorp1.xai-corp.net.
|
||||||
11 IN PTR home.xai-corp.net.
|
11 IN PTR home.xai-corp.net.
|
||||||
12 IN PTR cubox-i.xai-corp.net.
|
12 IN PTR cubox-i.xai-corp.net.
|
||||||
|
15 IN PTR cubox-m.xai-corp.net.
|
||||||
20 IN PTR garden.xai-corp.net.
|
20 IN PTR garden.xai-corp.net.
|
||||||
22 IN PTR home02.xai-corp.net.
|
22 IN PTR home02.xai-corp.net.
|
||||||
41 IN PTR dkhost01.xai-corp.net.
|
|
||||||
43 IN PTR dkhost02.xai-corp.net.
|
|
||||||
53 IN PTR dkhost03.xai-corp.net.
|
|
||||||
54 IN PTR dkhost04.xai-corp.net.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user