2018-03-16 18:28:19 +01:00
|
|
|
- name: confirm Tower version w/ check mode
|
|
|
|
tower_organization:
|
|
|
|
name: Default
|
|
|
|
check_mode: yes
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
2019-03-01 03:25:49 +01:00
|
|
|
- "result.tower_version == '{{ tower_version }}'"
|
2018-03-16 18:28:19 +01:00
|
|
|
|
2018-03-03 01:32:38 +01:00
|
|
|
- name: Make sure the default Default organization exists
|
|
|
|
tower_organization:
|
|
|
|
name: Default
|
2020-02-08 01:50:42 +01:00
|
|
|
|
|
|
|
- name: Check that SSL is available
|
|
|
|
tower_organization:
|
|
|
|
name: Default
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- name: Check we haven't changed anything
|
|
|
|
assert:
|
|
|
|
that: result is not changed
|
|
|
|
|
|
|
|
- name: Check that SSL is available and verify_ssl is enabled (task must fail)
|
|
|
|
tower_organization:
|
|
|
|
name: Default
|
|
|
|
environment:
|
|
|
|
TOWER_CERTIFICATE: /dev/null # force check failure
|
|
|
|
ignore_errors: true
|
|
|
|
register: check_ssl_is_used
|
|
|
|
|
|
|
|
- name: Disable verify_ssl in ~/.tower_cli.cfg
|
|
|
|
copy:
|
|
|
|
dest: ~/.tower_cli.cfg
|
|
|
|
content: |
|
|
|
|
[general]
|
|
|
|
verify_ssl = False
|
|
|
|
force: false # ensure remote file doesn't exist
|
|
|
|
|
2020-02-13 19:13:05 +01:00
|
|
|
- name: Check that verify_ssl is disabled (task must not fail)
|
|
|
|
tower_organization:
|
|
|
|
name: Default
|
|
|
|
environment:
|
|
|
|
TOWER_CERTIFICATE: /dev/null # should not fail because verify_ssl is disabled
|