File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Before running the playbook: -
13
13
1 . You have installed Ansible (any version from 2.5)
14
14
1 . The ` oc ` command-set is available to you as a user
15
15
1 . An OpenShift cluster has been installed
16
- 1 . There is an ` admin ` user known to the cluster
16
+ 1 . There is a suitable user known to the cluster
17
17
1 . You have setup your own ` setenv.sh `
18
18
(typically in Squonk's ` openshift/templates ` )
19
19
and you have run ` source setenv.sh ` using it.
Original file line number Diff line number Diff line change 1
1
---
2
2
3
- oc_admin : " {{ ansible_env.OC_ADMIN }}"
4
- oc_admin_password : " {{ ansible_env.OC_ADMIN_PASSWORD }}"
3
+ oc_user : " {{ ansible_env.OC_USER }}"
4
+ oc_user_password : " {{ ansible_env.OC_USER_PASSWORD }}"
5
5
oc_master_hostname : " {{ ansible_env.OC_MASTER_HOSTNAME }}"
6
6
oc_project : " {{ ansible_env.OC_PROJECT }}"
7
+ oc_project_sa : " {{ ansible_env.OC_PROJECT_SA }}"
7
8
oc_pipelines_sd_poster_image_tag : " {{ ansible_env.OC_PIPELINES_SD_POSTER_IMAGE_TAG }}"
8
9
9
10
# Various retry timeouts (seconds)...
Original file line number Diff line number Diff line change 4
4
# and then remove any existing poster job
5
5
# before deploying a new one (and waiting for completion).
6
6
7
- - name : Login (admin )
8
- shell : oc login {{ oc_master_hostname }} -u {{ oc_admin }} -p {{ oc_admin_password }}
7
+ - name : Login (user )
8
+ shell : oc login {{ oc_master_hostname }} -u {{ oc_user }} -p {{ oc_user_password }}
9
9
changed_when : False
10
10
11
11
- name : Move to Squonk Project
25
25
shell : >
26
26
oc process
27
27
-f {{ role_path }}/{{ t_dir }}/post-service-descriptors.yaml
28
+ -p POSTER_SA={{ oc_project_sa }}
28
29
-p POSTER_IMAGE_TAG={{ oc_pipelines_sd_poster_image_tag }}
29
30
| oc create -f -
30
31
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ parameters:
19
19
20
20
- name : POSTER_IMAGE_TAG
21
21
value : latest
22
+ - name : POSTER_SA
23
+ value : squonk
22
24
23
25
objects :
24
26
@@ -29,6 +31,7 @@ objects:
29
31
spec :
30
32
template :
31
33
spec :
34
+ serviceAccountName : ${POSTER_SA}
32
35
33
36
initContainers :
34
37
- image : yauritux/busybox-curl
You can’t perform that action at this time.
0 commit comments