Files
awx/awx_collection/tests/integration/targets/bulk_host_create/main.yml
Nikhil 9358d59f20 remove char_prompts and survey password from bulk job
fix the api-lint

fix the api-lint

add the descrition to the bulk job launch module params

 add the description for the description field

 add the description for the description field

add docs for the bulk api

fix the models on the bulk api serializers

fix some of the issues highlighted in the code review

better use of role model

remove comments

better error message

revert the PrimaryKeyRelatedField for unified_job_template and inventory
2023-03-08 12:58:12 -05:00

52 lines
1.1 KiB
YAML

---
- name: Generate a random string for test
set_fact:
test_id: "{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
when: test_id is not defined
- name: Generate a unique name
set_fact:
bulk_host_name: "AWX-Collection-tests-bulk_host_create-{{ test_id }}"
- name: Get our collection package
controller_meta:
register: controller_meta
- name: Generate the name of our plugin
set_fact:
plugin_name: "{{ controller_meta.prefix }}.controller_api"
- name: Create an inventory
inventory:
name: "{{ bulk_host_name }}"
organization: Default
state: present
register: inventory_result
- name: Bulk Host Create
bulk_host_create:
hosts:
- name: "123.456.789.123"
description: "myhost1"
variables:
food: carrot
color: orange
- name: example.dns.gg
description: "myhost2"
enabled: false
inventory: "{{ inventory_result.id }}"
register: result
- assert:
that:
- result is not failed
# cleanup
- name: Delete inventory
inventory:
name: "{{ bulk_host_name }}"
organization: Default
state: absent