-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathadhoc-create-keytab-secret.yml
37 lines (33 loc) · 1.11 KB
/
adhoc-create-keytab-secret.yml
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
---
##############
#
# Extra variables need to be passed to this playbook at runtime to create the
# secret which will contain the keytab for the group sync authoprization operator
#
# centosci_ocp_api_token_stg
# centosci_ocp_api_host_stg e.g. https://api.ocpci.os.stg.ci.centos.org:6443
#
##############
- name: Create openshift secret containing keytab
hosts: localhost
tasks:
- name: Create the CentosCIAuthorization operator keytab k8s Secret staging
community.okd.k8s:
api_key: "{{ centosci_ocp_api_token_stg }}"
host: "{{ centosci_ocp_api_host_stg }}"
validate_certs: no
state: present
definition:
apiVersion: v1
kind: Secret
metadata:
name: "centos-ci-keytab-secret"
namespace: "centos-ci-authorization-operator"
data:
centos-ci-authorization-keytab:
"{{ centosci_authorization_keytab_file | b64encode }}"
vars:
centosci_authorization_keytab_file:
"{{ lookup('file',
'../pkistore/aws-ocp/centos-ci-authorization-operator-stg-keytab.kt')
}}"