File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ Playbook variables:
29
29
containers. Default is an empty string.
30
30
31
31
* ``container_hotfix_files ``: A list of files to copy into each target
32
- container. Consists of a list of dicts with keys ``src `` and ``dest ``.
33
- Default is an empty list.
32
+ container. Consists of a list of dicts with keys ``src `` and ``dest ``
33
+ (required), and `` mode `` (optional - default 400). Default is an empty list.
34
34
35
35
* ``container_hotfix_container_regex ``: Regex to match container names against.
36
36
Must match the entire name e.g. "nova" or "nova*" will result in only
@@ -62,6 +62,7 @@ Example Variables file
62
62
container_hotfix_files :
63
63
- src : " ~/quick-fix.sh"
64
64
dest : " /tmp/quick-fix.sh"
65
+ mode : " 700"
65
66
- src : " /home/stackhpc/new_nova_conf.conf"
66
67
dest : " /etc/nova/nova.conf"
67
68
container_hotfix_container_regex : " nova.*"
Original file line number Diff line number Diff line change 9
9
loop : " {{ container_hotfix_files }}"
10
10
loop_control :
11
11
index_var : index
12
+
13
+ - name : Set mode for copied files
14
+ command : " {{ kolla_container_engine | default('docker') }} exec {{ '-u 0' if container_hotfix_become else '' }} {{ hotfix_container }} chmod {{ item.mode | default('400') }} {{ item.dest }}"
15
+ loop : " {{ container_hotfix_files }}"
16
+ loop_control :
17
+ index_var : index
18
+
12
19
when : container_hotfix_files != []
13
20
14
21
- name : Run container_hotfix_command
You can’t perform that action at this time.
0 commit comments