File tree 3 files changed +24
-23
lines changed
ansible/roles/deploy-crc-cloud/tasks
3 files changed +24
-23
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- - name : Create temporary directory
3
- ansible.builtin.tempfile :
4
- state : directory
5
- register : _temp_dir
6
-
7
- - name : Create Dockerfile
8
- ansible.builtin.copy :
9
- content : |
10
- FROM quay.io/centos/centos:stream9-minimal
11
- RUN microdnf --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install -y httpd-tools
12
- ENTRYPOINT ["htpasswd", "-Bbn"]
13
- dest : " {{ _temp_dir.path }}/Dockerfile"
14
-
15
- - name : Build container image for htpasswd
16
- ansible.builtin.command : |
17
- podman build -t localhost/htpasswd:latest -f {{ _temp_dir.path }}/Dockerfile
18
-
19
2
- name : " Get htpasswd for {{ user.name }}"
20
3
ansible.builtin.shell : |
21
4
podman run --rm -ti localhost/htpasswd:latest {{ user.name }} {{ user.password }} >> htpasswd.txt
22
-
23
- - name : Remove temporary directory
24
- ansible.builtin.file :
25
- path : " {{ _temp_dir.path }}"
26
- state : absent
Original file line number Diff line number Diff line change 5
5
path : htpasswd.txt
6
6
state : absent
7
7
8
+ - name : Create temporary directory
9
+ ansible.builtin.tempfile :
10
+ state : directory
11
+ register : _temp_dir
12
+
13
+ - name : Create Dockerfile
14
+ ansible.builtin.copy :
15
+ content : |
16
+ FROM quay.io/centos/centos:stream9-minimal
17
+ RUN microdnf --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install -y httpd-tools
18
+ ENTRYPOINT ["htpasswd", "-Bbn"]
19
+ dest : " {{ _temp_dir.path }}/Dockerfile"
20
+
21
+ - name : Build container image for htpasswd
22
+ ansible.builtin.command : |
23
+ podman build -t localhost/htpasswd:latest -f {{ _temp_dir.path }}/Dockerfile
24
+
8
25
- name : Get htpasswd
9
26
ansible.builtin.include_tasks : get_htpasswd.yaml
10
27
loop : " {{ users }}"
11
28
loop_control :
12
29
loop_var : user
30
+ no_log : true
13
31
14
32
- name : Cleanup htpasswd.txt file
15
33
ansible.builtin.shell : |
25
43
26
44
- name : Replace htpass-secret
27
45
ansible.builtin.command : oc replace -f /tmp/htpass-secret.yaml
46
+
47
+ - name : Remove temporary directory
48
+ ansible.builtin.file :
49
+ path : " {{ _temp_dir.path }}"
50
+ state : absent
Original file line number Diff line number Diff line change 9
9
retries : " {{ max_retries }}"
10
10
delay : " {{ retry_delay }}"
11
11
until : " 'False' not in component_status.stdout_lines"
12
- failed_when : " 'False' in component_status.stdout_lines and retry_count >= max_retries "
12
+ failed_when : " 'False' in component_status.stdout_lines"
13
13
ignore_errors : true
14
14
15
15
- name : Output success message if components are healthy
You can’t perform that action at this time.
0 commit comments