aboutsummaryrefslogtreecommitdiffstats
path: root/roles/photostructure/tasks/freeipa.yml
blob: 66d99e73098ca32d3452139be8e65cdea7df6e09 (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
- name: create user
  ipauser:
    ipaadmin_principal: '{{ ipa_user }}'
    ipaadmin_password: '{{ ipa_pass }}'
    name: '{{ photostructure_user }}'
    loginshell: /sbin/nologin
    homedir: '{{ photostructure_home }}'
    givenname: Photostructure
    sn: Service Account
    state: present
  run_once: yes

- name: retrieve user keytab
  include_role:
    name: freeipa_keytab
  vars:
    keytab_principal: '{{ photostructure_user }}'
    keytab_path: '{{ photostructure_keytab }}'

- name: configure gssproxy for kerberized NFS
  include_role:
    name: gssproxy_client
  vars:
    gssproxy_name: photostructure
    gssproxy_section: service/photostructure
    gssproxy_keytab: /etc/krb5.keytab
    gssproxy_client_keytab: '{{ photostructure_keytab }}'
    gssproxy_cred_usage: initiate
    gssproxy_euid: '{{ photostructure_user }}'

- name: add user to file access group
  ipagroup:
    ipaadmin_principal: '{{ ipa_user }}'
    ipaadmin_password: '{{ ipa_pass }}'
    name: '{{ photostructure_file_access_group }}'
    user: '{{ photostructure_user }}'
    action: member
    state: present
  run_once: yes

- name: create access group
  ipagroup:
    ipaadmin_principal: '{{ ipa_user }}'
    ipaadmin_password: '{{ ipa_pass }}'
    name: '{{ photostructure_access_group }}'
    state: present
  run_once: yes