aboutsummaryrefslogtreecommitdiffstats
path: root/roles/apache/tasks/gssapi.yml
blob: c006d54b5642ffaf14b6ce95569e190ce9f9b421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
- name: create HTTP service principal
  ipaservice:
    ipaadmin_principal: '{{ ipa_user }}'
    ipaadmin_password: '{{ ipa_pass }}'
    name: 'HTTP/{{ ansible_fqdn }}'
    state: present

- name: retrieve HTTP keytab
  include_role:
    name: freeipa_keytab
  vars:
    keytab_principal: 'HTTP/{{ ansible_fqdn }}'
    keytab_path: '{{ apache_keytab }}'

- name: configure gssproxy for kerberized HTTP
  include_role:
    name: gssproxy_client
  vars:
    gssproxy_name: httpd
    gssproxy_section: service/HTTP
    gssproxy_keytab: '{{ apache_keytab }}'
    gssproxy_cred_usage: accept
    gssproxy_euid: apache
    gssproxy_program: /usr/sbin/httpd

- name: create systemd override directory
  file:
    path: /etc/systemd/system/httpd.service.d
    state: directory

- name: set GSS_USE_PROXY=yes in httpd environment
  copy:
    src: etc/systemd/system/httpd.service.d/override.conf
    dest: /etc/systemd/system/httpd.service.d/override.conf
  register: apache_systemd_unit
  notify: restart apache

- name: reload systemd units
  systemd:
    daemon_reload: yes
  when: apache_systemd_unit.changed

- name: create gssapi session directory
  file:
    path: '{{ apache_session_dir }}'
    mode: 0700
    owner: apache
    group: apache
    state: directory