Generate addition drop-in dependencies for podman containers
Adding a new parameter: SystemdDropInDependencies (true by default). Which when set to True will create /etc/sysconfig/podman_drop_in on the host; to tell paunch to use paunch-start-podman-container script to start the containers. This file makes paunch generate additional systemd dependencies for containers that have special start/stop ordering constraints. It ensures that those constraints are enforced on reboot/shutdown. Depends-On: Idaf5d4871ad1231f2592238a7925857af8f40548 Change-Id: I4f8cd5ba4f747b0169ae0bddf6a14048fa782f32
This commit is contained in:
parent
f7cdac76ef
commit
a06cc5f93f
@ -53,9 +53,16 @@ parameters:
|
||||
username: pa55word
|
||||
'192.0.2.1:8787':
|
||||
registry_username: password
|
||||
SystemdDropInDependencies:
|
||||
default: true
|
||||
description: tell the container manager (e.g. paunch) to inject
|
||||
additional ordering dependencies for the systemd
|
||||
scopes associated to podman containers.
|
||||
type: boolean
|
||||
|
||||
conditions:
|
||||
insecure_registry_is_empty: {equals : [{get_param: DockerInsecureRegistryAddress}, []]}
|
||||
systemd_drop_in_dependencies_enabled: {get_param: SystemdDropInDependencies}
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
@ -102,6 +109,21 @@ outputs:
|
||||
tripleo_container_registry_logins: "{{ container_registry_logins }}"
|
||||
tripleo_container_registry_login: "{{ container_registry_login | bool }}"
|
||||
|
||||
- if:
|
||||
- systemd_drop_in_dependencies_enabled
|
||||
- - name: Configure paunch to generate systemd drop-in dependencies
|
||||
copy:
|
||||
dest: /etc/sysconfig/podman_drop_in
|
||||
content: |
|
||||
This file makes paunch generate additional systemd
|
||||
dependencies for containers that have special
|
||||
start/stop ordering constraints. It ensures that
|
||||
those constraints are enforced on reboot/shutdown.
|
||||
- - name: Configure paunch to not generate drop-in dependencies
|
||||
file:
|
||||
path: /etc/sysconfig/podman_drop_in
|
||||
state: absent
|
||||
|
||||
service_config_settings: {}
|
||||
|
||||
upgrade_tasks:
|
||||
|
Loading…
x
Reference in New Issue
Block a user