Combine keytabs together

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-12-20 05:13:49 +00:00
parent d9adca0c1b
commit a16153d7ad
2 changed files with 11 additions and 19 deletions

7
handlers/ipa.yml Normal file
View file

@ -0,0 +1,7 @@
########################
# Handlers for IPA stuff
#
# This is used to combine the IPA keytabs for local host and id.fp.o
- name: combine IPA http keytabs
shell: printf "%b" "read_kt /etc/httpd/conf/ipa.keytab\nread_kt /etc/krb5.HTTP_id{{env_suffix}}.fedoraproject.org.keytab\nwrite_kt /etc/krb5.HTTP_id{{env_suffix}}.fedoraproject.org.keytab.combined" | ktutil

View file

@ -46,28 +46,13 @@
owner_user: apache owner_user: apache
owner_group: apache owner_group: apache
service: HTTP service: HTTP
host: "id.stg.fedoraproject.org" host: "id{{env_suffix}}.fedoraproject.org"
when: env == "staging" notify:
- role: keytab/service - combine IPA http keytabs
owner_user: apache
owner_group: apache
service: HTTP
host: "id.fedoraproject.org"
when: env == "production"
tasks:
#- name: Make symlink for keytab
# file: state=link path=/etc/httpd/conf/ipa.keytab force=yes
# src="/etc/krb5.HTTP_id{{env_suffix}}.fedoraproject.org.keytab"
# notify:
# - reload httpd
# tags:
# - ipa/server
# - krb5
# when: env == "staging"
handlers: handlers:
- include: "{{ handlers }}/restart_services.yml" - include: "{{ handlers }}/restart_services.yml"
- include: "{{ handlers }}/ipa.yml"
- name: do base role once more to revert any resolvconf changes - name: do base role once more to revert any resolvconf changes
hosts: ipa:ipa-stg hosts: ipa:ipa-stg