diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-25 09:52:36 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-25 09:52:36 -0400 |
commit | 95b73daa36b23565a8566f71f9b202d3459b685f (patch) | |
tree | cb17b021be70e7868d0ec235a761f0ecdc80f3f2 /roles/services/freeipa |
Diffstat (limited to 'roles/services/freeipa')
-rw-r--r-- | roles/services/freeipa/client/defaults/main.yml | 0 | ||||
-rw-r--r-- | roles/services/freeipa/client/tasks/main.yml | 4 | ||||
-rw-r--r-- | roles/services/freeipa/server/defaults/main.yml | 1 | ||||
-rw-r--r-- | roles/services/freeipa/server/tasks/main.yml | 43 |
4 files changed, 48 insertions, 0 deletions
diff --git a/roles/services/freeipa/client/defaults/main.yml b/roles/services/freeipa/client/defaults/main.yml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/roles/services/freeipa/client/defaults/main.yml | |||
diff --git a/roles/services/freeipa/client/tasks/main.yml b/roles/services/freeipa/client/tasks/main.yml new file mode 100644 index 0000000..ccb047e --- /dev/null +++ b/roles/services/freeipa/client/tasks/main.yml | |||
@@ -0,0 +1,4 @@ | |||
1 | --- | ||
2 | - name: configure freeipa client | ||
3 | include_role: | ||
4 | name: freeipa.ansible_freeipa.ipaclient | ||
diff --git a/roles/services/freeipa/server/defaults/main.yml b/roles/services/freeipa/server/defaults/main.yml new file mode 100644 index 0000000..3e91a21 --- /dev/null +++ b/roles/services/freeipa/server/defaults/main.yml | |||
@@ -0,0 +1 @@ | |||
ipabackup_from_controller: yes | |||
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 @@ | |||
1 | --- | ||
2 | - name: set fedora dns | ||
3 | lineinfile: | ||
4 | path: /etc/systemd/resolved.conf | ||
5 | regexp: "^#?DNS=" | ||
6 | line: "DNS={{ ipa_dns_ip }}" | ||
7 | |||
8 | - name: restart systemd-resolved | ||
9 | service: | ||
10 | name: systemd-resolved | ||
11 | state: restarted | ||
12 | |||
13 | - name: set hostname | ||
14 | hostname: | ||
15 | name: ipasrv.home.local | ||
16 | |||
17 | - name: remove lines from /etc/hosts | ||
18 | lineinfile: | ||
19 | path: /etc/hosts | ||
20 | regexp: "^::1.*ipasrv" | ||
21 | state: absent | ||
22 | |||
23 | - name: remove lines from /etc/hosts | ||
24 | lineinfile: | ||
25 | path: /etc/hosts | ||
26 | regexp: "^127.0.0.1.*ipasrv" | ||
27 | state: absent | ||
28 | |||
29 | - name: add line to /etc/hosts | ||
30 | lineinfile: | ||
31 | path: /etc/hosts | ||
32 | line: "{{ ansible_default_ipv4.address }} ipasrv.home.local ipasrv" | ||
33 | state: present | ||
34 | |||
35 | - name: install freeipa-server | ||
36 | package: | ||
37 | name: freeipa-server | ||
38 | state: latest | ||
39 | |||
40 | #- name: restore ipaserver from backup | ||
41 | #include_role: | ||
42 | #name: freeipa.ansible_freeipa.ipabackup | ||
43 | #state: restored | ||