mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
New inventory plugin
The inventory plugin compiles a dynamic inventory from IPA domain, filters
servers by role(s).
Usage:
Create yml file, for example `freeipa.yml`:
---
plugin: freeipa
server: server.ipa.local
ipaadmin_password: SomeADMINpassword
verify: ca.crt
Get compiled inventory:
ansible-inventory -i freeipa.yml --graph
This commit is contained in:
@@ -125,6 +125,7 @@ sed -i -e "s/namespace: .*/namespace: \"$namespace\"/" galaxy.yml
|
||||
sed -i -e "s/name: .*/name: \"$name\"/" galaxy.yml
|
||||
|
||||
find . -name "*~" -exec rm {} \;
|
||||
find . -name "__py*__" -exec rm -rf {} \;
|
||||
|
||||
|
||||
if [ $offline != 1 ]; then
|
||||
@@ -155,6 +156,13 @@ python utils/create_action_group.py "meta/runtime.yml" "$collection_prefix"
|
||||
# ln -sf ../../roles/*/action_plugins/*.py .
|
||||
#})
|
||||
|
||||
# Adapt inventory plugin and inventory plugin README
|
||||
echo "Fixing inventory plugin and doc..."
|
||||
sed -i -e "s/plugin: freeipa/plugin: ${collection_prefix}.freeipa/g" plugins/inventory/freeipa.py
|
||||
sed -i -e "s/choices: \[\"freeipa\"\]/choices: \[\"${collection_prefix}.freeipa\"\]/g" plugins/inventory/freeipa.py
|
||||
sed -i -e "s/plugin: freeipa/plugin: ${collection_prefix}.freeipa/g" README-inventory-plugin-freeipa.md
|
||||
echo -e "\033[AFixing inventory plugin and doc... \033[32;1mDONE\033[0m"
|
||||
|
||||
for doc_fragment in plugins/doc_fragments/*.py; do
|
||||
fragment=$(basename -s .py "$doc_fragment")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user