Skip to content

Commit 4a41ac6

Browse files
authored
Merge pull request #993 from stackhpc/hotfix-fix
hotfix: Fix setting containers_list and running without a command
2 parents d766150 + 37b387a commit 4a41ac6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

etc/kayobe/ansible/hotfix-containers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030

3131
- name: Set fact for containers list
3232
set_fact:
33-
containers_list: host_containers.stdout
33+
containers_list: "{{ host_containers.stdout }}"
3434

3535
- name: Fail if no containers match given regex
3636
vars:
3737
hotfix_containers: "{{ containers_list | split('\n') | regex_search(container_hotfix_container_regex) }}"
3838
fail:
39-
msg: "No containers matched. Please check your regex. Containers running on host: {{ host_containers | split('\n') }}"
39+
msg: "No containers matched. Please check your regex. Containers running on host: {{ host_containers.stdout_lines }}"
4040
when: hotfix_containers == ""
4141

4242
- name: Ensure hotfix-files directory exists on the remote host

etc/kayobe/ansible/run-container-hotfix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020

2121
- name: Run container_hotfix_command
2222
command: "{{ kolla_container_engine | default('docker')}} exec {{ '-u 0' if container_hotfix_become else '' }} {{ hotfix_container }} {{ container_hotfix_command }}"
23+
when: container_hotfix_command

0 commit comments

Comments
 (0)