From cea076f3795010f3b870371d2ebd5d906ec81202 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 27 Apr 2023 11:41:55 +0200 Subject: Introduce oneshot docker_restart_policy docker_restart_policy: no causes systemd units to not get created and we use it in CI to disable restarts on services. Introducing oneshot policy to not create systemd unit for oneshot containers (those that are running bootstrap tasks, like db bootstrap and don't need a systemd unit), but still create systemd units for long lived containers but with Restart=No. Change-Id: I9e0d656f19143ec2fcad7d6d345b2c9387551604 --- ansible/library/kolla_docker.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ansible/library') diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py index f2be71675..e7d4105b2 100644 --- a/ansible/library/kolla_docker.py +++ b/ansible/library/kolla_docker.py @@ -180,6 +180,7 @@ options: choices: - no - on-failure + - oneshot - always - unless-stopped restart_retries: @@ -314,6 +315,7 @@ def generate_module(): restart_policy=dict(required=False, type='str', choices=[ 'no', 'on-failure', + 'oneshot', 'always', 'unless-stopped']), restart_retries=dict(required=False, type='int'), -- cgit v1.2.3