Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johanwiren/ansible-factcache
Provides a Redis-based cache for ansible fact data that is used by the custom inventory script.
https://github.com/johanwiren/ansible-factcache
Last synced: 11 days ago
JSON representation
Provides a Redis-based cache for ansible fact data that is used by the custom inventory script.
- Host: GitHub
- URL: https://github.com/johanwiren/ansible-factcache
- Owner: johanwiren
- Created: 2013-09-06T12:14:27.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-06T12:30:51.000Z (about 11 years ago)
- Last Synced: 2024-08-02T14:12:22.296Z (4 months ago)
- Language: Python
- Size: 113 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ansible-factcache
=================A callback plugin and a custom inventory script used to store and fetch ansible fact data in Redis.
Requirements
-------------* A running redis instance
Installation
------------* Copy *inventory.py* to *lib/ansible/callback_plugins*
* Copy *facts_to_groups.py* to */etc/ansible/hosts/* or just use it as your inventory script.Usage
-----When installed, run ``ansible -m setup all`` to collect all facts to the cache. When the cache is populated, you can start doing some interesting ad-hoc commands:
ansible -m shell -a "yum -y upgrade" "ansible_os_family_RedHat:&ansible_distribution_version_6.0"
Or use them in your playbooks:
- hosts: ansible_system_OpenBSD
tasks:
- debug: msg="Wow, this machine is awesome"Bugs
----Only simple facts are stored, no hashes or lists.