Rick Elrod 42109fb45a
[collection] Remove instance defaults from docs (#12964)
We don't specify defaults in the module (because it messes up Instance
updates because AWX things we are trying to change things to be the
default).

- Update the docs to remove the defaults that no longer exist
- Update tests to make them pass (oops)
- Fix tangentially related typo in Kind development docs

Signed-off-by: Rick Elrod <rick@elrod.me>
2022-09-27 15:18:38 -05:00

60 lines
1.5 KiB
YAML

---
- name: Generate hostnames
set_fact:
hostname1: "AWX-Collection-tests-instance1.{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}.example.com"
hostname2: "AWX-Collection-tests-instance2.{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}.example.com"
hostname3: "AWX-Collection-tests-instance3.{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}.example.com"
register: facts
- name: Show hostnames
debug:
var: facts
- block:
- name: Create an instance
awx.awx.instance:
hostname: "{{ item }}"
node_type: execution
node_state: installed
with_items:
- "{{ hostname1 }}"
- "{{ hostname2 }}"
register: result
- assert:
that:
- result is changed
- name: Create an instance with non-default config
awx.awx.instance:
hostname: "{{ hostname3 }}"
node_type: execution
node_state: installed
capacity_adjustment: 0.4
listener_port: 31337
register: result
- assert:
that:
- result is changed
- name: Update an instance
awx.awx.instance:
hostname: "{{ hostname1 }}"
capacity_adjustment: 0.7
register: result
- assert:
that:
- result is changed
always:
- name: Deprovision the instances
awx.awx.instance:
hostname: "{{ item }}"
node_state: deprovisioning
with_items:
- "{{ hostname1 }}"
- "{{ hostname2 }}"
- "{{ hostname3 }}"