Debian Codegraph @

ansible_collections/community/okd/molecule/default/prepare.yml

raw
1 ---
2 - name: Prepare
3 hosts: localhost
4 connection: local
5 gather_facts: no
6
7 tasks:
8 - pip:
9 name: virtualenv
10
11 - pip:
12 name:
13 - kubernetes>=12.0.0
14 - coverage
15 - python-ldap
16 virtualenv: "{{ virtualenv }}"
17 virtualenv_command: "{{ virtualenv_command }}"
18 virtualenv_site_packages: no
19
20 - name: 'Configure htpasswd secret (username: test, password: testing123)'
21 community.okd.k8s:
22 definition:
23 apiVersion: v1
24 kind: Secret
25 metadata:
26 name: htpass-secret
27 namespace: openshift-config
28 stringData:
29 htpasswd: "test:$2y$05$zgjczyp96jCIp//CGmnWiefhd7G3l54IdsZoV4IwA1UWtd04L0lE2"
30
31 - name: Configure htpasswd identity provider
32 community.okd.k8s:
33 definition:
34 apiVersion: config.openshift.io/v1
35 kind: OAuth
36 metadata:
37 name: cluster
38 spec:
39 identityProviders:
40 - name: htpasswd_provider
41 mappingMethod: claim
42 type: HTPasswd
43 htpasswd:
44 fileData:
45 name: htpass-secret
46
47 - name: Create ClusterRoleBinding for test user
48 community.okd.k8s:
49 definition:
50 apiVersion: rbac.authorization.k8s.io/v1
51 kind: ClusterRoleBinding
52 metadata:
53 name: test-cluster-reader
54 roleRef:
55 apiGroup: rbac.authorization.k8s.io
56 kind: ClusterRole
57 name: cluster-admin
58 subjects:
59 - apiGroup: rbac.authorization.k8s.io
60 kind: User
61 name: test