From 95b73daa36b23565a8566f71f9b202d3459b685f Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 25 Jun 2023 09:52:36 -0400 Subject: Initial Commit --- roles/services/freeipa/server/tasks/main.yml | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 roles/services/freeipa/server/tasks/main.yml (limited to 'roles/services/freeipa/server/tasks') diff --git a/roles/services/freeipa/server/tasks/main.yml b/roles/services/freeipa/server/tasks/main.yml new file mode 100644 index 0000000..32badc2 --- /dev/null +++ b/roles/services/freeipa/server/tasks/main.yml @@ -0,0 +1,43 @@ +--- +- name: set fedora dns + lineinfile: + path: /etc/systemd/resolved.conf + regexp: "^#?DNS=" + line: "DNS={{ ipa_dns_ip }}" + +- name: restart systemd-resolved + service: + name: systemd-resolved + state: restarted + +- name: set hostname + hostname: + name: ipasrv.home.local + +- name: remove lines from /etc/hosts + lineinfile: + path: /etc/hosts + regexp: "^::1.*ipasrv" + state: absent + +- name: remove lines from /etc/hosts + lineinfile: + path: /etc/hosts + regexp: "^127.0.0.1.*ipasrv" + state: absent + +- name: add line to /etc/hosts + lineinfile: + path: /etc/hosts + line: "{{ ansible_default_ipv4.address }} ipasrv.home.local ipasrv" + state: present + +- name: install freeipa-server + package: + name: freeipa-server + state: latest + +#- name: restore ipaserver from backup + #include_role: + #name: freeipa.ansible_freeipa.ipabackup + #state: restored -- cgit v1.2.3