This role has the following modules for interacting with an Alvao inventory server
alvao_auth
- Obtain an auth tokenalvao_facts
- Search Alvao for objects matching a given search queryalvao_update
- Update a single Alvao object
See the module documentation for more information: ansible-doc -M <path/to/role/library> <module_name>
- requests
This role does not have any tasks, but for ansible to find the modules without modifying
ansible.cfg
, import the role in your playbook:
---
- hosts: all
tasks:
- name: Import alvao role
import_role:
name: alvao
- name: Fetch alvao auth token
alvao_auth:
Otherwise configure library
and module_utils
in your ansible.cfg
.
alvao_object_props
- Will return an object's properties as a simple dictionary
Example:
- debug:
msg: "{{ item|alvao_object_props }}"
with_items: "{{ alvao_facts['results'] }}"
loop_control:
label: "{{ item.name }}"