aboutsummaryrefslogtreecommitdiff
path: root/ansible/module_utils
diff options
context:
space:
mode:
authorIvan Halomi <ivan.halomi@tietoevry.com>2024-03-06 12:57:00 +0100
committerRoman Krček <roman.krcek@tietoevry.com>2025-02-07 09:40:43 +0000
commit19af5826fc10c7e068e196e68c0d9950e8d13f89 (patch)
tree5a8be5b95e3053482017c272260356173a7940aa /ansible/module_utils
parent401b2b347e54a65c42beab979a82db47be99af0d (diff)
downloadkolla-ansible-19af5826fc10c7e068e196e68c0d9950e8d13f89.tar.gz
kolla-ansible-19af5826fc10c7e068e196e68c0d9950e8d13f89.zip
Move actions to kolla_container_facts
Move actions responsible for info about containers from kolla_container module to kolla_container_facts. Also fixes a bug with inconsistencies between docker and podman in kolla_container_facts. Closes-bug: #2084878 Change-Id: I1db88e28a828ebf073f018b2bae1d9556ec22807 Signed-off-by: Ivan Halomi <ivan.halomi@tietoevry.com> Signed-off-by: Martin Hiner <martin.hiner@tietoevry.com> Signed-off-by: Roman Krček <roman.krcek@tietoevry.com>
Diffstat (limited to 'ansible/module_utils')
-rw-r--r--ansible/module_utils/kolla_container_worker.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/ansible/module_utils/kolla_container_worker.py b/ansible/module_utils/kolla_container_worker.py
index bc0f3b471..3e16ac2c9 100644
--- a/ansible/module_utils/kolla_container_worker.py
+++ b/ansible/module_utils/kolla_container_worker.py
@@ -449,30 +449,6 @@ class ContainerWorker(ABC):
def start_container(self):
pass
- def get_container_env(self):
- name = self.params.get('name')
- info = self.get_container_info()
- if not info:
- self.module.fail_json(msg="No such container: {}".format(name))
- else:
- envs = dict()
- for env in info['Config']['Env']:
- if '=' in env:
- key, value = env.split('=', 1)
- else:
- key, value = env, ''
- envs[key] = value
-
- self.module.exit_json(**envs)
-
- def get_container_state(self):
- name = self.params.get('name')
- info = self.get_container_info()
- if not info:
- self.module.fail_json(msg="No such container: {}".format(name))
- else:
- self.module.exit_json(**info['State'])
-
def parse_healthcheck(self, healthcheck):
if not healthcheck:
return None