update nameserver playbook to setup for debian bullseye, and add new cubox to inventory

This commit is contained in:
2022-08-21 08:59:43 -04:00
parent be6f184b81
commit 42c80b4894
4 changed files with 17 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
---
- name: bootstrap
hosts: cubox-m
hosts: managed
# remote_user: ansible
gather_facts: false
# become: true
@@ -94,10 +94,14 @@
- name: remove {{item}} user if it exists
command: userdel -rf {{item}}
become: true
become_user: ansible
args:
removes: /home/{{item}}/.bashrc
loop:
- debian
- ubuntu
- name: fix bullseye-security
ansible.builtin.replace:
path: /etc/apt/sources.list
regexp: '(\s+)bullseye\/updates(\s+.*)?$'
replace: '\1bullseye-security\/updates\2'

View File

@@ -1,10 +1,18 @@
---
# 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
cron:
name: zoneedit
minute: "*/30"
minute: "*/45"
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'
cron_file: zoneedit

View File

@@ -38,6 +38,7 @@ dkhost05 IN A 192.168.4.55
ns IN A 192.168.4.11
ns01 IN CNAME ns
ns02 IN CNAME cubox-i
ns03 IN CNAME cubox-m
; gluster servers
;gluster IN A 192.168.4.11

View File

@@ -17,9 +17,6 @@ $ORIGIN 4.168.192.IN-ADDR.ARPA.
103 IN PTR xaicorp1.xai-corp.net.
11 IN PTR home.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.
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.