mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Fix up the collection integration tests
This commit is contained in:
@@ -1,14 +1,4 @@
|
||||
- name: create a tempdir for hostvars
|
||||
local_action: shell mktemp -d
|
||||
register: tempdir
|
||||
|
||||
- name: write a file w/ hostvars
|
||||
local_action:
|
||||
module: lineinfile
|
||||
dest: "{{ tempdir.stdout }}/vars"
|
||||
line: '{"foo": "bar"}'
|
||||
create: true
|
||||
|
||||
---
|
||||
- name: Generate an inventory name
|
||||
set_fact:
|
||||
inv_name: "inv-for-group-{{ lookup('password', '/dev/null chars=ascii_letters length=16') }}"
|
||||
@@ -24,7 +14,8 @@
|
||||
name: "some-host"
|
||||
inventory: "{{ inv_name }}"
|
||||
state: present
|
||||
variables: "@{{ tempdir.stdout }}/vars"
|
||||
variables:
|
||||
foo: bar
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
@@ -53,4 +44,5 @@
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.msg =='Failed to update host, inventory not found: The requested object could not be found.'"
|
||||
- "result.msg =='The inventories test-non-existing-inventory was not found on the Tower server' or
|
||||
result.msg =='Failed to update host, inventory not found: The requested object could not be found.'"
|
||||
|
||||
Reference in New Issue
Block a user