Skip to content

Commit 270f621

Browse files
authored
Enable Kerberos ticket caching role for PVC Base examples (#142)
* Update tf_hosts to make instance idempotent * Use latest cldr-runner images * Update pre_setup to enable caching of Kerberos ticket as files * Add restart sssd handler * Move tasks for KRB ticket cache setup to role Signed-off-by: Jim Enright <[email protected]>
1 parent de85c0a commit 270f621

File tree

6 files changed

+42
-2
lines changed

6 files changed

+42
-2
lines changed

private-cloud/base/aws-iaas/ansible-navigator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ansible-navigator:
4949
ANSIBLE_DEPRECATION_WARNINGS: False
5050
ANSIBLE_HOST_KEY_CHECKING: False
5151
ANSIBLE_SSH_RETRIES: 10
52-
image: ghcr.io/cloudera-labs/cldr-runner:aws-latest
52+
image: ghcr.io/cloudera-labs/cldr-runner-aws:latest
5353
pull:
5454
arguments:
5555
- "--tls-verify=false"

private-cloud/base/aws-iaas/pre_setup.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@
130130
ipaadmin_principal: "{{ freeipa.ipaadmin_user | default(lookup('ansible.builtin.env', 'IPA_USER', default=omit)) }}"
131131
enable_dns: yes
132132

133+
- name: Update SSSD to enable Kerberos file ticket caching
134+
ansible.builtin.import_role:
135+
name: krb_file_ticket_cache
136+
vars:
137+
sssd_domain: "{{ domain }}"
138+
133139
- name: Establish supporting services resources
134140
hosts: deployment
135141
gather_facts: no
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
# sssd_domain:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- name: restart sssd
3+
ansible.builtin.service:
4+
name: sssd
5+
state: restarted
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
- name: Update the SSSD for caching of Kerberos ticket as files
3+
community.general.ini_file:
4+
path: /etc/sssd/sssd.conf
5+
section: "domain/{{ sssd_domain }}"
6+
option: "{{ sssd.key }}"
7+
value: "{{ sssd.value | string }}"
8+
loop: "{{ entries | dict2items }}"
9+
loop_control:
10+
loop_var: sssd
11+
label: "{{ sssd.key }}"
12+
vars:
13+
entries:
14+
krb5_ccname_template: 'FILE:/tmp/krb5cc_%U_XXXXXX'
15+
notify: restart sssd
16+
17+
- name: Comment default_ccache_name in krb5.conf.d
18+
ansible.builtin.replace:
19+
dest: /etc/krb5.conf.d/kcm_default_ccache
20+
regexp: '({{ krb_item }})'
21+
replace: '# \1'
22+
loop_control:
23+
loop_var: krb_item
24+
loop:
25+
- '^\[libdefaults\]'
26+
- '^\s+default_ccache_name = KCM'
27+
notify: restart sssd

private-cloud/base/aws-iaas/tf_hosts/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ resource "aws_instance" "pvc_base" {
4343
subnet_id = var.subnet_ids[count.index % length(var.subnet_ids)]
4444
associate_public_ip_address = var.public_ip
4545

46-
security_groups = var.security_groups
46+
vpc_security_group_ids = var.security_groups
4747

4848
root_block_device {
4949
delete_on_termination = var.root_volume.delete_on_termination

0 commit comments

Comments
 (0)