-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the FreeIPA server into its own VM
Fixes: #52 Signed-off-by: Aurélien Bompard <[email protected]>
- Loading branch information
Showing
21 changed files
with
287 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
--- | ||
- hosts: freeipa | ||
- hosts: ipa | ||
become: true | ||
become_method: sudo | ||
roles: | ||
- common | ||
- freeipa | ||
- role: freeipa | ||
tags: ipa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
- name: Install RPM packages | ||
dnf: | ||
name: | ||
- httpd | ||
- krb5-workstation | ||
- sqlite | ||
- openssl | ||
- mod_ssl | ||
state: present | ||
|
||
- name: kinit for Apache | ||
shell: echo "{{ ipa_admin_password }}" | kinit {{ ipa_admin_user }}@{{ krb_realm }} | ||
|
||
- name: Get the certificates | ||
import_role: | ||
name: cert | ||
vars: | ||
cert_hostname: "{{ ansible_fqdn }}" | ||
cert_basename: server | ||
|
||
- name: configure SSLCertificateFile in ssl.conf | ||
lineinfile: | ||
path: /etc/httpd/conf.d/ssl.conf | ||
regexp: "SSLCertificateFile \/etc\/pki\/tls\/certs\/localhost.crt" | ||
line: SSLCertificateFile /etc/pki/tls/certs/server.pem | ||
|
||
- name: configure SSLCertificateKeyFile in ssl.conf | ||
lineinfile: | ||
path: /etc/httpd/conf.d/ssl.conf | ||
regexp: "SSLCertificateKeyFile \/etc\/pki\/tls\/private\/localhost.key" | ||
line: SSLCertificateKeyFile /etc/pki/tls/private/server.key | ||
|
||
- name: set default client keytab in krb5.conf | ||
lineinfile: | ||
path: /etc/krb5.conf | ||
insertafter: 'default_ccache_name.*' | ||
line: ' default_client_keytab_name = FILE:/etc/httpd/conf/http.keytab' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
service: HTTP | ||
krb_service: HTTP | ||
cert_hostname: "{{ ansible_fqdn }}" | ||
cert_basename: server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
|
||
|
||
- name: Generate and get SSL cert | ||
shell: ipa-getcert request -f /etc/pki/tls/certs/server.pem -k /etc/pki/tls/private/server.key -K {{ service }}/{{ ansible_fqdn }} | ||
shell: ipa-getcert request -f /etc/pki/tls/certs/{{ cert_basename }}.pem -k /etc/pki/tls/private/{{ cert_basename }}.key -K {{ krb_service }}/{{ cert_hostname }} -N {{ cert_hostname }} | ||
args: | ||
creates: /etc/pki/tls/certs/server.pem | ||
creates: /etc/pki/tls/certs/{{ cert_basename }}.pem | ||
|
||
- name: Check the cert is there | ||
wait_for: | ||
path: /etc/pki/tls/certs/server.pem | ||
path: /etc/pki/tls/certs/{{ cert_basename }}.pem | ||
state: present | ||
|
||
- name: Check the key is there | ||
wait_for: | ||
path: /etc/pki/tls/private/server.key | ||
path: /etc/pki/tls/private/{{ cert_basename }}.key | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vhost: fasjson.{{ ansible_domain }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.