tripleo-container-manage: set some defaults
Set defaults that are needed to use the role outside of THT more easily. Change-Id: Id67cf06c85a2a6b50e6494b1a66f534ccb06c4a7
This commit is contained in:
parent
115e95bcae
commit
609d7895a1
@ -18,4 +18,6 @@
|
||||
# All variables intended for modification should place placed in this file.
|
||||
|
||||
# All variables within this role should have a prefix of "tripleo_container_manage"
|
||||
tripleo_container_cli: podman
|
||||
tripleo_container_manage_cli: podman
|
||||
tripleo_container_manage_log_path: '/var/log/containers/stdouts'
|
||||
tripleo_container_manage_healthcheck_disabled: false
|
||||
|
@ -39,8 +39,6 @@
|
||||
owner: root
|
||||
group: root
|
||||
become: true
|
||||
when:
|
||||
- tripleo_container_manage_log_path is defined
|
||||
|
||||
- name: Generate containers configs data
|
||||
no_log: true
|
||||
@ -68,7 +66,7 @@
|
||||
|
||||
- name: Manage containers with Podman
|
||||
when:
|
||||
- tripleo_container_cli == 'podman'
|
||||
- tripleo_container_manage_cli == 'podman'
|
||||
become: true
|
||||
block:
|
||||
- name: "Manage Podman containers at step {{ step }}"
|
||||
|
@ -20,7 +20,7 @@
|
||||
- item.1.action == 'exec'
|
||||
block:
|
||||
- name: "Check if {{ item.1.command.0 }} container exists"
|
||||
command: "{{ tripleo_container_cli }} container exists {{ item.1.command.0 }}"
|
||||
command: "{{ tripleo_container_manage_cli }} container exists {{ item.1.command.0 }}"
|
||||
- name: "Check if {{ item.1.command.0 }} container is running"
|
||||
block:
|
||||
- name: "Gather podman infos for {{ item.1.command.0 }}"
|
||||
@ -35,7 +35,7 @@
|
||||
- name: "Prepare the exec command for {{ item.0 }}"
|
||||
set_fact:
|
||||
cmd_template:
|
||||
- "{{ tripleo_container_cli }}"
|
||||
- "{{ tripleo_container_manage_cli }}"
|
||||
- "exec"
|
||||
- "-u"
|
||||
- "{{ item.1.user if item.1.user is defined else 'root' }}"
|
||||
@ -65,7 +65,7 @@
|
||||
container_name: "{{ item.0 }}"
|
||||
managed_by: tripleo_ansible
|
||||
config_data: "{{ item.1 | to_json }}"
|
||||
log_driver: "{{ 'k8s-file' if tripleo_container_manage_log_path is defined else '' }}"
|
||||
log_driver: 'k8s-file'
|
||||
# log_opt: |
|
||||
# "{{ 'path=' if tripleo_container_manage_log_path is defined else '' }}
|
||||
# {{ tripleo_container_manage_log_path | default('') }}
|
||||
@ -134,7 +134,7 @@
|
||||
- systemd_file.changed
|
||||
- name: "Manage systemd healthcheck for {{ item.0 }}"
|
||||
when:
|
||||
- not (container_healthcheck_disabled | default(false))
|
||||
- not tripleo_container_manage_healthcheck_disabled
|
||||
- item.1.healthcheck is defined
|
||||
block:
|
||||
- name: "Create systemd unit file for {{ item.0 }} healthcheck"
|
||||
|
Loading…
Reference in New Issue
Block a user