Revert "Configurable list of facts modules (#31783)" (#40022)

This reverts commit 95655fae5c.
This commit is contained in:
Toshio Kuratomi 2018-05-14 13:46:14 -07:00 committed by Matt Davis
commit 38ab36a625
12 changed files with 3 additions and 173 deletions

View file

@ -1 +0,0 @@
posix/ci/group3

View file

@ -1,14 +0,0 @@
- hosts: testhost
tasks:
- name: ensure facts have not been collected
assert:
that:
- ansible_facts is undefined or not 'fqdn' in ansible_facts
- hosts: testhost
gather_facts: True
tasks:
- name: ensure facts have been collected
assert:
that:
- ansible_facts is defined and 'fqdn' in ansible_facts

View file

@ -1,23 +0,0 @@
- hosts: testhost
tasks:
- name: check that facts were gathered but no local facts exist
assert:
that:
- ansible_facts is defined and 'fqdn' in ansible_facts
- not 'uuid' in ansible_local
- name: create 'local facts' for next gathering
copy:
src: uuid.fact
dest: /etc/ansible/facts.d/
mode: 0755
- hosts: testhost
tasks:
- name: ensure facts are gathered and includes the new 'local facts' created above
assert:
that:
- ansible_facts is defined and 'fqdn' in ansible_facts
- "'uuid' in ansible_local"
- name: cleanup 'local facts' from target
file: path=/etc/ansible/facts.d/uuid.fact state=absent

View file

@ -1,7 +0,0 @@
#!/usr/bin/env bash
set -eux
ANSIBLE_GATHERING=smart ansible-playbook smart.yml --flush-cache -i ../../inventory -v "$@"
ANSIBLE_GATHERING=implicit ansible-playbook implicit.yml --flush-cache -i ../../inventory -v "$@"
ANSIBLE_GATHERING=explicit ansible-playbook explicit.yml --flush-cache -i ../../inventory -v "$@"

View file

@ -1,23 +0,0 @@
- hosts: testhost
tasks:
- name: ensure facts are gathered but no local exists
assert:
that:
- ansible_facts is defined and 'fqdn' in ansible_facts
- not 'uuid' in ansible_local
- name: create local facts for latter test
copy:
src: uuid.fact
dest: /etc/ansible/facts.d/
mode: 0755
- hosts: testhost
tasks:
- name: ensure we still have facts, but didnt pickup new local ones
assert:
that:
- ansible_facts is defined and 'fqdn' in ansible_facts
- not 'uuid' in ansible_local
- name: remove local facts file
file: path=/etc/ansible/facts.d/uuid.fact state=absent

View file

@ -1,10 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import uuid
# return a random string
print(json.dumps(str(uuid.uuid4())))

View file

@ -1,6 +1,5 @@
- name: test playbook for ansible-pull
hosts: all
gather_facts: False
tasks:
- name: debug output
debug: msg="test task"