Adding container engine to kolla_container_facts
Second part of patchset: https://review.opendev.org/c/openstack/kolla-ansible/+/799229/ in which was suggested to split patch into smaller ones. This change adds container_engine variable to kolla_container_facts module, this prepares module to be used with docker and podman as well without further changes in roles. Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Co-authored-by: Martin Hiner <m.hiner@partner.samsung.com> Change-Id: I9e8fa30646844ab4a288555f3aafdda345b3a118
This commit is contained in:
parent
910f9bd36f
commit
7a9f04573a
@ -27,6 +27,11 @@ description:
|
||||
- A module targeting at collecting Docker container facts. It is used for
|
||||
detecting whether the container is running on host in Kolla.
|
||||
options:
|
||||
container_engine:
|
||||
description:
|
||||
- Name of container engine to use
|
||||
required: True
|
||||
type: str
|
||||
api_version:
|
||||
description:
|
||||
- The version of the api for docker-py to use when contacting docker
|
||||
@ -49,6 +54,7 @@ EXAMPLES = '''
|
||||
|
||||
- name: Gather glance container facts
|
||||
kolla_container_facts:
|
||||
container_engine: docker
|
||||
name:
|
||||
- glance_api
|
||||
- glance_registry
|
||||
@ -62,7 +68,8 @@ def get_docker_client():
|
||||
def main():
|
||||
argument_spec = dict(
|
||||
name=dict(required=False, type='list', default=[]),
|
||||
api_version=dict(required=False, type='str', default='auto')
|
||||
api_version=dict(required=False, type='str', default='auto'),
|
||||
container_engine=dict(required=True, type='str')
|
||||
)
|
||||
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- aodh_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- barbican_api
|
||||
register: container_facts
|
||||
|
@ -3,6 +3,7 @@
|
||||
- name: Check if bifrost_deploy container is running
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- bifrost_deploy
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- blazar_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- cinder_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- cloudkitty_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- cyborg_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- designate_api
|
||||
- designate_backend_bind9
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- elasticsearch
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- etcd
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- freezer_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name: "{{ glance_services.values() | map(attribute='container_name') | list }}"
|
||||
register: container_facts
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- gnocchi_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- grafana
|
||||
register: container_facts
|
||||
|
@ -2,6 +2,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- hacluster_pacemaker_remote
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- heat_api
|
||||
- heat_api_cfn
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- horizon
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- influxdb
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- ironic_api
|
||||
- ironic_inspector
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- iscsid
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- kafka
|
||||
register: container_facts
|
||||
|
@ -2,6 +2,7 @@
|
||||
- name: Checking for any running keystone_fernet containers
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- keystone_fernet
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- keystone
|
||||
- keystone_ssh
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- kibana
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- kuryr
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- haproxy
|
||||
- proxysql
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- magnum_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- manila_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- mariadb
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- masakari_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- memcached
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- mistral_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name: "{{ monasca_services.values() | map(attribute='container_name') | list }}"
|
||||
register: container_facts
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- murano_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- neutron_server
|
||||
register: container_facts
|
||||
|
@ -9,6 +9,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- nova_libvirt
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- nova_libvirt
|
||||
- nova_novncproxy
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- nova_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- octavia_api
|
||||
- octavia_health_manager
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- openvswitch_db
|
||||
register: container_facts
|
||||
|
@ -2,6 +2,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- ovn_nb_db
|
||||
- ovn_sb_db
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- placement_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- prometheus_server
|
||||
- prometheus_node_exporter
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- rabbitmq
|
||||
- outward_rabbitmq
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- redis
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- sahara_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- senlin_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- skydive_analyzer
|
||||
- skydive_agent
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- solum_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- storm_worker
|
||||
- storm_nimbus
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- swift_account_server
|
||||
- swift_container_server
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- tacker_server
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- trove_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- venus_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- vitrage_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- watcher_api
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- zookeeper
|
||||
register: container_facts
|
||||
|
@ -8,6 +8,7 @@
|
||||
- name: Get container facts
|
||||
become: true
|
||||
kolla_container_facts:
|
||||
container_engine: "{{ kolla_container_engine }}"
|
||||
name:
|
||||
- zun_api
|
||||
- zun_wsproxy
|
||||
|
Loading…
Reference in New Issue
Block a user