Rewrite ansible-pull tests to use local repo. (#22821)

This commit is contained in:
Matt Clay 2017-03-21 00:30:02 -07:00 committed by GitHub
commit 45951a69a6
10 changed files with 54 additions and 36 deletions

View file

@ -0,0 +1,2 @@
[defaults]
inventory = inventory

View file

@ -0,0 +1,2 @@
testhost1.example.com
localhost

View file

@ -0,0 +1,13 @@
- name: test playbook for ansible-pull
hosts: all
tasks:
- name: debug output
debug: msg="test task"
- name: check for correct inventory
debug: msg="testing for inventory content"
failed_when: "'testhost1.example.com' not in groups['all']"
- name: check for correct limit
debug: msg="testing for limit"
failed_when: "'testhost1.example.com' == inventory_hostname"
- name: final task, has to be reached for the test to succeed
debug: msg="MAGICKEYWORD"