We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD iocage Jail manager provides lists of jails. Use it to create dynamic inventory.
Feature Idea
New inventory plugin iocage
Example of the jail list
shell> ssh [email protected] iocage list +------+----------+-------+--------------+------------+ | JID | NAME | STATE | RELEASE | IP4 | +======+==========+=======+==============+============+ | None | test_101 | down | 13.4-RELEASE | 10.1.0.101 | +------+----------+-------+--------------+------------+ | None | test_102 | down | 13.4-RELEASE | 10.1.0.102 | +------+----------+-------+--------------+------------+ | None | test_103 | down | 13.4-RELEASE | 10.1.0.103 | +------+----------+-------+--------------+------------+
Example of the inventory configuration file
shell> cat iocage.yml plugin: community.general.iocage host: 10.1.0.18 user: admin groups: test: inventory_hostname.startswith('test')
The playbook
shell> cat pb-test.yml - hosts: test tasks: - debug: msg: | inventory_hostname: {{ inventory_hostname }} {% for var in q('varnames', 'iocage_*') %} {{ var }}: {{ lookup('vars', var) }} {% endfor %} - debug: var: groups run_once: true
gives
shell> ansible-playbook pb-test.yml -i iocage.yml PLAY [test] **************************************************************************************** TASK [debug] **************************************************************************************** ok: [test_101] => msg: |- inventory_hostname: test_101 iocage_jid: - iocage_boot: off iocage_state: down iocage_type: jail iocage_release: 13.4-RELEASE-p2 iocage_ip4: 10.1.0.101 iocage_ip6: - iocage_template: ansible_client iocage_basejail: yes ok: [test_102] => msg: |- inventory_hostname: test_102 iocage_jid: - iocage_boot: off iocage_state: down iocage_type: jail iocage_release: 13.4-RELEASE-p2 iocage_ip4: 10.1.0.102 iocage_ip6: - iocage_template: ansible_client iocage_basejail: yes ok: [test_103] => msg: |- inventory_hostname: test_103 iocage_jid: - iocage_boot: off iocage_state: down iocage_type: jail iocage_release: 13.4-RELEASE-p2 iocage_ip4: 10.1.0.103 iocage_ip6: - iocage_template: ansible_client iocage_basejail: yes TASK [debug] **************************************************************************************** ok: [test_101] => groups: all: - test_101 - test_102 - test_103 test: - test_101 - test_102 - test_103 ungrouped: [] PLAY RECAP **************************************************************************************** test_101 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 test_102 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 test_103 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
The text was updated successfully, but these errors were encountered:
Add inventory plugin iocage ansible-collections#9261
2250bf7
Files identified in the description:
plugins/modules/openbsd_pkg.py
If these files are incorrect, please update the component name section of the description or use the !component bot command.
component name
!component
click here for bot help
Sorry, something went wrong.
cc @JoergFiedler @MacLemon @bcoca @dch @eest @jasperla @mekanix @opoplawski @overhacked @tuxillo click here for bot help
lib/ansible/plugins/inventory
@vbotka nice! how can I help with review process here?
No branches or pull requests
Summary
FreeBSD iocage Jail manager provides lists of jails. Use it to create dynamic inventory.
Issue Type
Feature Idea
Component Name
New inventory plugin iocage
Additional Information
Example of the jail list
Example of the inventory configuration file
The playbook
gives
Code of Conduct
The text was updated successfully, but these errors were encountered: