Fix DNS for replica rollout plus info

This commit is contained in:
nazunalika 2020-12-10 01:43:19 -07:00
parent d07670d7e2
commit a9a483b546
5 changed files with 45 additions and 0 deletions

View File

@ -8,3 +8,12 @@ scripts -> Scripts for infrastructure go here
tests -> Repo specific tests tests -> Repo specific tests
utils -> Utilities focused for infrastructure or testing this repo utils -> Utilities focused for infrastructure or testing this repo
``` ```
## Contributions
See a place for improvement? See an error or bug? Have your own scripts or playbooks you want to add? Help us by opening an issue with a pull request for review!
## Branches
The main branch is currently the only branch. It is currently in discussion how the branches should be configured to not commit to main full time.

View File

@ -8,3 +8,8 @@
service: service:
name: httpd name: httpd
state: restarted state: restarted
- name: reload_networkmanager
service:
name: NetworkManager
state: reloaded

View File

@ -34,6 +34,7 @@ ipareplica_setup_firewalld=yes
ipareplica_setup_ca=yes ipareplica_setup_ca=yes
ipareplica_setup_kra=yes ipareplica_setup_kra=yes
ipareplica_setup_dns=yes ipareplica_setup_dns=yes
ipa_dns_master=10.100.1.110
[ipaclients] [ipaclients]
build-a-box.rockylinux.org ansible_host=10.100.1.112 build-a-box.rockylinux.org ansible_host=10.100.1.112

View File

@ -19,6 +19,32 @@
- "not no_ansible.stat.exists" - "not no_ansible.stat.exists"
msg: "/etc/no-ansible exists - skipping run on this node" msg: "/etc/no-ansible exists - skipping run on this node"
- name: Ensure 'dns=none' is set for Network Manager
ini_file:
path: /etc/NetworkManager/NetworkManager.conf
state: present
no_extra_spaces: yes
section: main
option: dns
value: none
owner: root
group: root
mode: 0644
backup: yes
notify:
- reload_networkmanager
- name: Ensure resolv.conf is pointing to main master
template:
src: templates/resolv.conf.j2
dest: /etc/resolv.conf
owner: root
group: root
mode: 0644
backup: yes
notify:
- reload_networkmanager
roles: roles:
- role: ipareplica - role: ipareplica
state: present state: present

View File

@ -0,0 +1,4 @@
# Generated by Ansible
search {{ ipareplica_domain }}
nameserver {{ ipa_dns_master }}