Switch cli data to environment vars
In order to not have to do special shell quoting, we can use environment vars to handle that instead. Change-Id: Ie0c6ccc654ef3b04bcb0f4da81bad16220a973a6
This commit is contained in:
parent
bb480ed481
commit
55997d6401
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
# defaults file for tripleo_container_image_delete
|
||||
openstack_bin: openstack
|
||||
tripleo_container_image_delete_become: true
|
||||
tripleo_container_image_delete_debug: false
|
||||
tripleo_container_image_delete_password:
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
driver:
|
||||
name: delegated
|
||||
options:
|
||||
managed: false
|
||||
ansible_connection_options:
|
||||
ansible_connection: local
|
||||
log: true
|
||||
lint:
|
||||
name: yamllint
|
||||
enabled: false
|
||||
platforms:
|
||||
- name: instance
|
||||
provisioner:
|
||||
name: ansible
|
||||
scenario:
|
||||
name: default
|
||||
test_sequence:
|
||||
- syntax
|
||||
- converge
|
||||
- verify
|
|
@ -0,0 +1,87 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
|
||||
- name: "Include tripleo_container_image_delete"
|
||||
include_role:
|
||||
name: "tripleo_container_image_delete"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_delete_become: false
|
||||
tripleo_container_image_delete_debug: true
|
||||
tripleo_container_image_delete_image: containername
|
||||
|
||||
- name: Check role
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_delete_result.stdout == "tripleo container image delete --yes containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_delete_username"
|
||||
include_role:
|
||||
name: "tripleo_container_image_delete"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_delete_become: false
|
||||
tripleo_container_image_delete_debug: true
|
||||
tripleo_container_image_delete_username: test
|
||||
tripleo_container_image_delete_image: containername
|
||||
|
||||
- name: debug value
|
||||
debug:
|
||||
msg: "{{ tripleo_container_image_delete_result.stdout }}"
|
||||
|
||||
- name: Assert "tripleo_container_image_delete_username"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_delete_result.stdout == "tripleo container image delete --username test --yes containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_delete_password"
|
||||
include_role:
|
||||
name: "tripleo_container_image_delete"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_delete_become: false
|
||||
tripleo_container_image_delete_debug: true
|
||||
tripleo_container_image_delete_password: test
|
||||
tripleo_container_image_delete_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_delete_password"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_delete_result.stdout == "tripleo container image delete --password test --yes containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_delete_registry_url"
|
||||
include_role:
|
||||
name: "tripleo_container_image_delete"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_delete_become: false
|
||||
tripleo_container_image_delete_debug: true
|
||||
tripleo_container_image_delete_registry_url: 127.0.0.1:8787
|
||||
tripleo_container_image_delete_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_delete_registry_url"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_delete_result.stdout == "tripleo container image delete --registry-url 127.0.0.1:8787 --yes containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_delete_yes"
|
||||
include_role:
|
||||
name: "tripleo_container_image_delete"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_delete_become: false
|
||||
tripleo_container_image_delete_debug: true
|
||||
tripleo_container_image_delete_yes: false
|
||||
tripleo_container_image_delete_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_delete_yes"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_delete_result.stdout == "tripleo container image delete containername"
|
|
@ -3,10 +3,10 @@
|
|||
- name: Setup container image delete facts
|
||||
set_fact:
|
||||
_delete_cmd: >-
|
||||
openstack tripleo container image delete
|
||||
{{ tripleo_container_image_delete_username | ternary('--username ' ~ tripleo_container_image_delete_username, '') }}
|
||||
{{ tripleo_container_image_delete_password | ternary('--password ' ~ tripleo_container_image_delete_password, '') }}
|
||||
{{ tripleo_container_image_delete_registry_url | ternary('--registry-url ' ~ tripleo_container_image_delete_registry_url, '') }}
|
||||
{{ openstack_bin }} tripleo container image delete
|
||||
{{ tripleo_container_image_delete_username | ternary('--username $TRIPLEO_IMAGE_DELETE_USERNAME', '') }}
|
||||
{{ tripleo_container_image_delete_password | ternary('--password $TRIPLEO_IMAGE_DELETE_PASSWORD', '') }}
|
||||
{{ tripleo_container_image_delete_registry_url | ternary('--registry-url $TRIPLEO_IMAGE_DELETE_REGISTRY_URL', '') }}
|
||||
{{ tripleo_container_image_delete_yes | ternary('--yes', '') }}
|
||||
{{ tripleo_container_image_delete_image }}
|
||||
|
||||
|
@ -17,6 +17,10 @@
|
|||
|
||||
- name: Container image delete
|
||||
shell: "{{ _delete_cmd }}" # noqa 305
|
||||
environment:
|
||||
TRIPLEO_IMAGE_DELETE_USERNAME: "{{ tripleo_container_image_delete_username | default('') }}"
|
||||
TRIPLEO_IMAGE_DELETE_PASSWORD: "{{ tripleo_container_image_delete_password | default('') }}"
|
||||
TRIPLEO_IMAGE_DELETE_REGISTRY_URL: "{{ tripleo_container_image_delete_registry_url | default('') }}"
|
||||
become: "{{ tripleo_container_image_delete_become }}"
|
||||
register: tripleo_container_image_delete_result
|
||||
changed_when: true
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
# defaults file for tripleo_container_image_list
|
||||
openstack_bin: openstack
|
||||
tripleo_container_image_list_debug: false
|
||||
tripleo_container_image_list_format: json
|
||||
tripleo_container_image_list_password:
|
||||
tripleo_container_image_list_registry:
|
||||
tripleo_container_image_list_registry_url:
|
||||
tripleo_container_image_list_username:
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
driver:
|
||||
name: delegated
|
||||
options:
|
||||
managed: false
|
||||
ansible_connection_options:
|
||||
ansible_connection: local
|
||||
log: true
|
||||
lint:
|
||||
name: yamllint
|
||||
enabled: false
|
||||
platforms:
|
||||
- name: instance
|
||||
provisioner:
|
||||
name: ansible
|
||||
scenario:
|
||||
name: default
|
||||
test_sequence:
|
||||
- syntax
|
||||
- converge
|
||||
- verify
|
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
|
||||
- name: "Include tripleo_container_image_list"
|
||||
include_role:
|
||||
name: "tripleo_container_image_list"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_list_debug: true
|
||||
|
||||
- name: Check role
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_list_result.stdout == "tripleo container image list -f json"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_list_username"
|
||||
include_role:
|
||||
name: "tripleo_container_image_list"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_list_debug: true
|
||||
tripleo_container_image_list_username: test
|
||||
|
||||
- name: Assert "tripleo_container_image_list_username"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_list_result.stdout == "tripleo container image list --username test -f json"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_list_password"
|
||||
include_role:
|
||||
name: "tripleo_container_image_list"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_list_debug: true
|
||||
tripleo_container_image_list_password: test
|
||||
|
||||
- name: Assert "tripleo_container_image_list_password"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_list_result.stdout == "tripleo container image list --password test -f json"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_list_registry_url"
|
||||
include_role:
|
||||
name: "tripleo_container_image_list"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_list_debug: true
|
||||
tripleo_container_image_list_registry_url: 127.0.0.1:8787
|
||||
|
||||
- name: Assert "tripleo_container_image_list_registry_url"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_list_result.stdout == "tripleo container image list --registry-url 127.0.0.1:8787 -f json"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_list_format"
|
||||
include_role:
|
||||
name: "tripleo_container_image_list"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_list_debug: true
|
||||
tripleo_container_image_list_format: values
|
||||
|
||||
- name: Assert "tripleo_container_image_list_registry_url"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_list_result.stdout == "tripleo container image list -f values"
|
|
@ -3,11 +3,11 @@
|
|||
- name: Setup container image list facts
|
||||
set_fact:
|
||||
_list_cmd: >-
|
||||
openstack tripleo container image list
|
||||
{{ tripleo_container_image_list_username | ternary('--username ' ~ tripleo_container_image_list_username, '') }}
|
||||
{{ tripleo_container_image_list_password | ternary('--password ' ~ tripleo_container_image_list_password, '') }}
|
||||
{{ tripleo_container_image_list_registry | ternary('--registry ' ~ tripleo_container_image_list_registry, '') }}
|
||||
{{ tripleo_container_image_list_format | ternary('-f ' ~ tripleo_container_image_list_format, '') }}
|
||||
{{ openstack_bin }} tripleo container image list
|
||||
{{ tripleo_container_image_list_username | ternary('--username $TRIPLEO_IMAGE_LIST_USERNAME', '') }}
|
||||
{{ tripleo_container_image_list_password | ternary('--password $TRIPLEO_IMAGE_LIST_PASSWORD', '') }}
|
||||
{{ tripleo_container_image_list_registry_url | ternary('--registry-url $TRIPLEO_IMAGE_LIST_REGISTRY_URL', '') }}
|
||||
{{ tripleo_container_image_list_format | ternary('-f $TRIPLEO_IMAGE_LIST_FORMAT', '') }}
|
||||
|
||||
- name: Show the container image list command
|
||||
debug:
|
||||
|
@ -16,6 +16,11 @@
|
|||
|
||||
- name: Container image list
|
||||
shell: "{{ _list_cmd }}" # noqa 305
|
||||
environment:
|
||||
TRIPLEO_IMAGE_LIST_USERNAME: "{{ tripleo_container_image_list_username | default('') }}"
|
||||
TRIPLEO_IMAGE_LIST_PASSWORD: "{{ tripleo_container_image_list_password | default('') }}"
|
||||
TRIPLEO_IMAGE_LIST_REGISTRY_URL: "{{ tripleo_container_image_list_registry_url | default('') }}"
|
||||
TRIPLEO_IMAGE_LIST_FORMAT: "{{ tripleo_container_image_list_format | default('') }}"
|
||||
register: tripleo_container_image_list_result
|
||||
changed_when: false
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
# defaults file for tripleo_container_image_push
|
||||
openstack_bin: openstack
|
||||
tripleo_container_image_push_append_tag:
|
||||
tripleo_container_image_push_become: true
|
||||
tripleo_container_image_push_cleanup: false
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
driver:
|
||||
name: delegated
|
||||
options:
|
||||
managed: false
|
||||
ansible_connection_options:
|
||||
ansible_connection: local
|
||||
log: true
|
||||
lint:
|
||||
name: yamllint
|
||||
enabled: false
|
||||
platforms:
|
||||
- name: instance
|
||||
provisioner:
|
||||
name: ansible
|
||||
scenario:
|
||||
name: default
|
||||
test_sequence:
|
||||
- syntax
|
||||
- converge
|
||||
- verify
|
|
@ -0,0 +1,147 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
|
||||
- name: "Include tripleo_container_image_push"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Check role
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_push_local"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_local: true
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_push_local"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push --local containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_push_username"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_username: test
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_push_username"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push --username test containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_push_password"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_password: test
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_push_password"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push --password test containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_push_registry_url"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_registry_url: 127.0.0.1:8787
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_push_registry_url"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push --registry-url 127.0.0.1:8787 containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_push_append_tag"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_append_tag: -foobar
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_push_append_tag"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push --append-tag -foobar containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_push_dry_run"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_dry_run: true
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_push_dry_run"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push --dry-run containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_push_multi_arch"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_multi_arch: true
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_push_multi_arch"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push --multi-arch containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_push_cleanup"
|
||||
include_role:
|
||||
name: "tripleo_container_image_push"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
# TODO: remove this when sudo works with molecule
|
||||
tripleo_container_image_push_become: false
|
||||
tripleo_container_image_push_debug: true
|
||||
tripleo_container_image_push_cleanup: true
|
||||
tripleo_container_image_push_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_push_cleanup"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_push_result.stdout == "tripleo container image push --cleanup containername"
|
|
@ -3,12 +3,12 @@
|
|||
- name: Setup container image push facts
|
||||
set_fact:
|
||||
_push_cmd: >-
|
||||
openstack tripleo container image push
|
||||
{{ openstack_bin }} tripleo container image push
|
||||
{{ tripleo_container_image_push_local | ternary('--local', '') }}
|
||||
{{ tripleo_container_image_push_registry_url | ternary('--registry-url ' ~ tripleo_container_image_push_registry_url, '') }}
|
||||
{{ tripleo_container_image_push_append_tag | ternary('--append-tag ' ~ tripleo_container_image_push_append_tag, '') }}
|
||||
{{ tripleo_container_image_push_username | ternary('--username ' ~ tripleo_container_image_push_username, '') }}
|
||||
{{ tripleo_container_image_push_password | ternary('--password ' ~ tripleo_container_image_push_password, '') }}
|
||||
{{ tripleo_container_image_push_username | ternary('--username $TRIPLEO_IMAGE_PUSH_USERNAME', '') }}
|
||||
{{ tripleo_container_image_push_password | ternary('--password $TRIPLEO_IMAGE_PUSH_PASSWORD', '') }}
|
||||
{{ tripleo_container_image_push_registry_url | ternary('--registry-url $TRIPLEO_IMAGE_PUSH_REGISTRY_URL', '') }}
|
||||
{{ tripleo_container_image_push_append_tag | ternary('--append-tag $TRIPLEO_IMAGE_PUSH_APPEND_TAG', '') }}
|
||||
{{ tripleo_container_image_push_dry_run | ternary('--dry-run', '') }}
|
||||
{{ tripleo_container_image_push_multi_arch | ternary('--multi-arch', '') }}
|
||||
{{ tripleo_container_image_push_cleanup | ternary('--cleanup', '') }}
|
||||
|
@ -21,8 +21,13 @@
|
|||
|
||||
- name: Container image push
|
||||
shell: "{{ _push_cmd }}" # noqa 305
|
||||
environment:
|
||||
TRIPLEO_IMAGE_PUSH_APPEND_TAG: "{{ tripleo_container_image_push_append_tag | default('') }}"
|
||||
TRIPLEO_IMAGE_PUSH_USERNAME: "{{ tripleo_container_image_push_username | default('') }}"
|
||||
TRIPLEO_IMAGE_PUSH_PASSWORD: "{{ tripleo_container_image_push_password | default('') }}"
|
||||
TRIPLEO_IMAGE_PUSH_REGISTRY_URL: "{{ tripleo_container_image_push_registry_url | default('') }}"
|
||||
async: "{{ tripleo_container_image_push_timeout }}"
|
||||
poll: 1
|
||||
become: "{{ tripleo_container_image_push_become }}"
|
||||
register: tripleo_container_image_push_result
|
||||
changed_when: true
|
||||
changed_when: not tripleo_container_image_push_dry_run|bool
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
# defaults file for tripleo_container_image_show
|
||||
openstack_bin: openstack
|
||||
tripleo_container_image_show_debug: false
|
||||
tripleo_container_image_show_format: json
|
||||
tripleo_container_image_show_password:
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
driver:
|
||||
name: delegated
|
||||
options:
|
||||
managed: false
|
||||
ansible_connection_options:
|
||||
ansible_connection: local
|
||||
log: true
|
||||
lint:
|
||||
name: yamllint
|
||||
enabled: false
|
||||
platforms:
|
||||
- name: instance
|
||||
provisioner:
|
||||
name: ansible
|
||||
scenario:
|
||||
name: default
|
||||
test_sequence:
|
||||
- syntax
|
||||
- converge
|
||||
- verify
|
|
@ -0,0 +1,59 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
|
||||
- name: "Include tripleo_container_image_show"
|
||||
include_role:
|
||||
name: "tripleo_container_image_show"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_show_debug: true
|
||||
tripleo_container_image_show_image: containername
|
||||
|
||||
- name: Check role
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_show_result.stdout == "tripleo container image show -f json containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_show_username"
|
||||
include_role:
|
||||
name: "tripleo_container_image_show"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_show_debug: true
|
||||
tripleo_container_image_show_username: test
|
||||
tripleo_container_image_show_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_show_username"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_show_result.stdout == "tripleo container image show --username test -f json containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_show_password"
|
||||
include_role:
|
||||
name: "tripleo_container_image_show"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_show_debug: true
|
||||
tripleo_container_image_show_password: test
|
||||
tripleo_container_image_show_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_show_password"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_show_result.stdout == "tripleo container image show --password test -f json containername"
|
||||
|
||||
- name: Check parameter "tripleo_container_image_show_format"
|
||||
include_role:
|
||||
name: "tripleo_container_image_show"
|
||||
vars:
|
||||
openstack_bin: echo
|
||||
tripleo_container_image_show_debug: true
|
||||
tripleo_container_image_show_format: values
|
||||
tripleo_container_image_show_image: containername
|
||||
|
||||
- name: Assert "tripleo_container_image_show_format"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_container_image_show_result.stdout == "tripleo container image show -f values containername"
|
|
@ -3,10 +3,10 @@
|
|||
- name: Setup container image show facts
|
||||
set_fact:
|
||||
_show_cmd: >-
|
||||
openstack tripleo container image show
|
||||
{{ tripleo_container_image_show_username | ternary('--username ' ~ tripleo_container_image_show_username), '') }}
|
||||
{{ tripleo_container_image_show_password | ternary('--password ' ~ tripleo_container_image_show_password, '') }}
|
||||
{{ tripleo_container_image_show_format | ternary('-f ' ~ tripleo_container_image_show_format, '') }}
|
||||
{{ openstack_bin }} tripleo container image show
|
||||
{{ tripleo_container_image_show_username | ternary('--username $TRIPLEO_IMAGE_SHOW_USERNAME', '') }}
|
||||
{{ tripleo_container_image_show_password | ternary('--password $TRIPLEO_IMAGE_SHOW_PASSWORD', '') }}
|
||||
{{ tripleo_container_image_show_format | ternary('-f $TRIPLEO_IMAGE_SHOW_FORMAT', '') }}
|
||||
{{ tripleo_container_image_show_image }}
|
||||
|
||||
- name: Show the container image show command
|
||||
|
@ -16,6 +16,10 @@
|
|||
|
||||
- name: Container image show
|
||||
shell: "{{ _show_cmd }}" # noqa 305
|
||||
environment:
|
||||
TRIPLEO_IMAGE_SHOW_USERNAME: "{{ tripleo_container_image_show_username | default('') }}"
|
||||
TRIPLEO_IMAGE_SHOW_PASSWORD: "{{ tripleo_container_image_show_password | default('') }}"
|
||||
TRIPLEO_IMAGE_SHOW_FORMAT: "{{ tripleo_container_image_show_format | default('') }}"
|
||||
register: tripleo_container_image_show_result
|
||||
changed_when: false
|
||||
|
||||
|
|
|
@ -2,12 +2,20 @@
|
|||
name: tripleo-operator-molecule-jobs
|
||||
check:
|
||||
jobs:
|
||||
- tripleo-operator-molecule-tripleo_container_image_delete
|
||||
- tripleo-operator-molecule-tripleo_container_image_list
|
||||
- tripleo-operator-molecule-tripleo_container_image_push
|
||||
- tripleo-operator-molecule-tripleo_container_image_show
|
||||
- tripleo-operator-molecule-tripleo_overcloud_export
|
||||
- tripleo-operator-molecule-tripleo_overcloud_failures
|
||||
- tripleo-operator-molecule-tripleo_overcloud_node_introspect
|
||||
|
||||
gate:
|
||||
jobs:
|
||||
- tripleo-operator-molecule-tripleo_container_image_delete
|
||||
- tripleo-operator-molecule-tripleo_container_image_list
|
||||
- tripleo-operator-molecule-tripleo_container_image_push
|
||||
- tripleo-operator-molecule-tripleo_container_image_show
|
||||
- tripleo-operator-molecule-tripleo_overcloud_export
|
||||
- tripleo-operator-molecule-tripleo_overcloud_failures
|
||||
- tripleo-operator-molecule-tripleo_overcloud_node_introspect
|
||||
|
@ -19,6 +27,38 @@
|
|||
success-url: "reports.html"
|
||||
failure-url: "reports.html"
|
||||
|
||||
- job:
|
||||
files:
|
||||
- ^roles/tripleo_container_image_delete/.*
|
||||
name: tripleo-operator-molecule-tripleo_container_image_delete
|
||||
parent: tripleo-operator-molecule-base
|
||||
vars:
|
||||
tox_extra_args: tripleo_container_image_delete
|
||||
|
||||
- job:
|
||||
files:
|
||||
- ^roles/tripleo_container_image_list/.*
|
||||
name: tripleo-operator-molecule-tripleo_container_image_list
|
||||
parent: tripleo-operator-molecule-base
|
||||
vars:
|
||||
tox_extra_args: tripleo_container_image_list
|
||||
|
||||
- job:
|
||||
files:
|
||||
- ^roles/tripleo_container_image_push/.*
|
||||
name: tripleo-operator-molecule-tripleo_container_image_push
|
||||
parent: tripleo-operator-molecule-base
|
||||
vars:
|
||||
tox_extra_args: tripleo_container_image_push
|
||||
|
||||
- job:
|
||||
files:
|
||||
- ^roles/tripleo_container_image_show/.*
|
||||
name: tripleo-operator-molecule-tripleo_container_image_show
|
||||
parent: tripleo-operator-molecule-base
|
||||
vars:
|
||||
tox_extra_args: tripleo_container_image_show
|
||||
|
||||
- job:
|
||||
files:
|
||||
- ^roles/tripleo_overcloud_export/.*
|
||||
|
|
Loading…
Reference in New Issue