New in version 2.3.
- aos-pyez >= 0.6.0
parameter | required | default | choices | comments |
---|---|---|---|---|
content |
no |
Datastructure of the Rack Type to create. The data can be in YAML / JSON or directly a variable. It's the same datastructure that is returned on success in value.
|
||
id |
no |
AOS Id of the Rack Type to manage (can't be used to create a new Rack Type), Only one of name, id or content can be set.
|
||
name |
no |
Name of the Rack Type to manage. Only one of name, id or content can be set.
|
||
session |
yes |
An existing AOS session as obtained by aos_login module.
|
||
state |
no | present |
|
Indicate what is the expected state of the Rack Type (present or not).
|
- name: "Delete a Rack Type by name" aos_rack_type: session: "{{ aos_session }}" name: "my-rack-type" state: absent - name: "Delete a Rack Type by id" aos_rack_type: session: "{{ aos_session }}" id: "45ab26fc-c2ed-4307-b330-0870488fa13e" state: absent # Save a Rack Type to a file - name: "Access Rack Type 1/3" aos_rack_type: session: "{{ aos_session }}" name: "my-rack-type" state: present register: rack_type - name: "Save Rack Type into a JSON file 2/3" copy: content: "{{ rack_type.value | to_nice_json }}" dest: rack_type_saved.json - name: "Save Rack Type into a YAML file 3/3" copy: content: "{{ rack_type.value | to_nice_yaml }}" dest: rack_type_saved.yaml - name: "Load Rack Type from a JSON file" aos_rack_type: session: "{{ aos_session }}" content: "{{ lookup('file', 'resources/rack_type_saved.json') }}" state: present - name: "Load Rack Type from a YAML file" aos_rack_type: session: "{{ aos_session }}" content: "{{ lookup('file', 'resources/rack_type_saved.yaml') }}" state: present
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.