Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pageflt/ansible-jailventory
Ansible dynamic inventory provider for FreeBSD jails.
https://github.com/pageflt/ansible-jailventory
ansible configuration-management freebsd jail
Last synced: 10 days ago
JSON representation
Ansible dynamic inventory provider for FreeBSD jails.
- Host: GitHub
- URL: https://github.com/pageflt/ansible-jailventory
- Owner: pageflt
- License: bsd-2-clause
- Created: 2018-08-16T21:43:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T22:47:45.000Z (about 6 years ago)
- Last Synced: 2024-02-13T21:18:34.908Z (9 months ago)
- Topics: ansible, configuration-management, freebsd, jail
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jailventory
Ansible dynamic inventory provider for FreeBSD jails.
## Usage
- Make sure `jailventory.py` is executable:
```
$ chmod +x jailventory.py
```- Add the following directive to your `ansible.cfg`:
```
inventory = /path/to/jailventory.py
```- Ansible should now automatically detect any active jails and add them to the `jails` group:
```
$ jls
JID IP Address Hostname Path
16 192.168.1.1 www /home/jails/www
17 192.168.1.2 dns /home/jails/dns
$ ansible jails -m ping -o
dns | SUCCESS => {"changed": false, "ping": "pong"}
www | SUCCESS => {"changed": false, "ping": "pong"}
$ sudo service jail start mail
Starting jails: mail.
$ jls
JID IP Address Hostname Path
16 192.168.1.1 www /home/jails/www
17 192.168.1.2 dns /home/jails/dns
18 192.168.1.3 mail /home/jails/mail
$ ansible jails -m ping -o
dns | SUCCESS => {"changed": false, "ping": "pong"}
www | SUCCESS => {"changed": false, "ping": "pong"}
mail | SUCCESS => {"changed": false, "ping": "pong"}
```