mirror of
https://github.com/ansible/awx.git
synced 2026-07-03 12:28:01 -02:30
pycharm refactor rename files and class, linux rename tower_ controller_
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
---
|
||||
- name: Generate a test ID
|
||||
set_fact:
|
||||
test_id: "{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
|
||||
- name: Generate an org name
|
||||
set_fact:
|
||||
org_name: "AWX-Collection-tests-tower_organization-org-{{ test_id }}"
|
||||
group_name1: "AWX-Collection-tests-tower_instance_group-group1-{{ test_id }}"
|
||||
|
||||
- name: Make sure {{ org_name }} is not there
|
||||
tower_organization:
|
||||
name: "{{ org_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- name: "Create a new organization"
|
||||
tower_organization:
|
||||
name: "{{ org_name }}"
|
||||
galaxy_credentials:
|
||||
- Ansible Galaxy
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that: "result is changed"
|
||||
|
||||
- name: "Make sure making the same org is not a change"
|
||||
tower_organization:
|
||||
name: "{{ org_name }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is not changed"
|
||||
|
||||
- name: Create an Instance Group
|
||||
tower_instance_group:
|
||||
name: "{{ group_name1 }}"
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: "Pass in all parameters"
|
||||
tower_organization:
|
||||
name: "{{ org_name }}"
|
||||
description: "A description"
|
||||
instance_groups:
|
||||
- "{{ group_name1 }}"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: "Change the description"
|
||||
tower_organization:
|
||||
name: "{{ org_name }}"
|
||||
description: "A new description"
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete the instance groups
|
||||
tower_instance_group:
|
||||
name: "{{ group_name1 }}"
|
||||
state: absent
|
||||
|
||||
- name: "Remove the organization"
|
||||
tower_organization:
|
||||
name: "{{ org_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: "Remove a missing organization"
|
||||
tower_organization:
|
||||
name: "{{ org_name }}"
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is not changed"
|
||||
|
||||
# Test behaviour common to all tower modules
|
||||
- name: Check that SSL is available and verify_ssl is enabled (task must fail)
|
||||
tower_organization:
|
||||
name: Default
|
||||
validate_certs: true
|
||||
ignore_errors: true
|
||||
register: check_ssl_is_used
|
||||
|
||||
- name: Check that connection failed
|
||||
assert:
|
||||
that:
|
||||
- "'CERTIFICATE_VERIFY_FAILED' in check_ssl_is_used['msg']"
|
||||
|
||||
- name: Check that verify_ssl is disabled (task must not fail)
|
||||
tower_organization:
|
||||
name: Default
|
||||
validate_certs: false
|
||||
Reference in New Issue
Block a user