tripleo-operator-ansible/roles/tripleo_container_image_list
Cédric Jeanneret 7ae7c668ed Ensure we export result only if we have an stdout
I841743fb6c2c24e4a3d86598f99322022b27804d introduced a sort of "dry-run"
capability to the operators, but it didn't take care of the possible
exposure of the shell stdout in a fact. Thus, if you enabled the
generate_scripts_only feature, your ansible run would fail on the
exposure, since the variable it refers to will not exist.

Change-Id: I07225e6b82199cf15860e55db6995c994da65931
2020-05-15 15:43:20 +02:00
..
defaults Switch cli data to environment vars 2020-01-29 14:55:09 -07:00
meta Rename roles to use underscore 2020-01-21 10:12:00 -07:00
molecule/default Add ability to write scripts 2020-04-15 16:25:27 -06:00
tasks Ensure we export result only if we have an stdout 2020-05-15 15:43:20 +02:00
tests Fixed flake8 excludes and new-lines 2020-01-27 19:10:31 +00:00
README.md Enabled markdownlint 2020-01-28 13:27:26 +00:00

README.md

tripleo_container_image_list

A role to perform the container image list against a registry.

Requirements

None.

Role Variables

  • tripleo_container_image_list_debug: (Boolean) Flag to print out the list command. Default: False
  • tripleo_container_image_list_format: (String) The format that the output will be in. By default we specify 'json' so that the output will be parsed in ansible. Default: json
  • tripleo_container_image_list_password: (String) Password for the registry
  • tripleo_container_image_list_registry: (String) Registry to run the list against
  • tripleo_container_image_list_username: (String) Username for the registry

Output Variables

  • tripleo_container_image_list_output: (List|String) If tripleo_container_image_list_format is JSON, the results will automatically be parsed and a list is returned. If another format is used then this will be the response in String format.
  • tripleo_container_image_list_result: Ansible shell execution results

Dependencies

None.

Example Playbook

Example container list execution playbook

- hosts: undercloud
  gather_facts: true
  tasks:
    - name: List containers
      import_role:
        name: tripleo_container_image_list
    - name: Print containers
      debug:
        msg: "{{ item['Image Name'] }}"
      loop: "{{ tripleo_container_image_list_output }}"

License

Apache-2.0