New in version 2.7.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
attr_data | Attribute Yang path and their corresponding data. | |
attr_type | Attribute Yang type. | |
commit_event bool |
| Attempts to force the auto-commit event to the specified yang object. |
db bool |
| Queries/Writes the specified yang path from/to the db. |
module_name | Yang path to be configured. | |
operation |
| Operation to be performed on the object. |
qualifier |
| A qualifier provides the type of object data to retrieve or act on. |
- name: Create VLAN opx_cps: module_name: "dell-base-if-cmn/if/interfaces/interface" attr_data: { "base-if-vlan/if/interfaces/interface/id": 230, "if/interfaces/interface/name": "br230", "if/interfaces/interface/type": "ianaift:l2vlan" } operation: "create" - name: Get VLAN opx_cps: module_name: "dell-base-if-cmn/if/interfaces/interface" attr_data: { "if/interfaces/interface/name": "br230", } operation: "get" - name: Modify some attributes in VLAN opx_cps: module_name: "dell-base-if-cmn/if/interfaces/interface" attr_data: { "cps/key_data": { "if/interfaces/interface/name": "br230" }, "dell-if/if/interfaces/interface/untagged-ports": ["e101-008-0"], } operation: "set" - name: Delete VLAN opx_cps: module_name: "dell-base-if-cmn/if/interfaces/interface" attr_data: { "if/interfaces/interface/name": "br230", } operation: "delete"
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
candidate dict | all CPS operations other than "get" | CPS input attribute data used to compare with running configuration Sample: {'base-if-vlan/if/interfaces/interface/id': 230, 'if/interfaces/interface/type': 'ianaift:l2vlan', 'if/interfaces/interface/name': 'br230'} |
commit_event bool | when commit_event is set to True in module options | Denotes if auto-commit event is set Sample: True |
config dict | when CPS operations set, delete | Returns the CPS Get output i.e. the running configuration before performing the CPS transaction Sample: {'dell-base-if-cmn/if/interfaces/interface/if-index': 46, 'dell-if/if/interfaces/interface/phys-address': '', 'base-if-vlan/if/interfaces/interface/id': 230, 'if/interfaces/interface/name': 'br230', 'if/interfaces/interface/type': 'ianaift:l2vlan', 'dell-if/if/interfaces/interface/vlan-type': 1, 'dell-if/if/interfaces/interface/learning-mode': 1, 'dell-if/if/interfaces/interface/mtu': 1532, 'if/interfaces/interface/enabled': 0} |
db bool | when db is set to True in module options | Denotes if CPS DB transaction was performed Sample: True |
diff dict | all CPS operations other than "get" | The actual configuration that will be pushed comparing the running configuration and input attributes Sample: {'base-if-vlan/if/interfaces/interface/id': 230, 'if/interfaces/interface/type': 'ianaift:l2vlan', 'if/interfaces/interface/name': 'br230'} |
response list | when a CPS transaction is successfully performed. | Output from the CPS transaction. Sample: [{'data': {'cps/object-group/return-code': 0, 'base-if-vlan/if/interfaces/interface/id': 230, 'if/interfaces/interface/type': 'ianaift:l2vlan', 'if/interfaces/interface/name': 'br230', 'dell-base-if-cmn/if/interfaces/interface/if-index': 46}, 'key': 'target/dell-base-if-cmn/if/interfaces/interface'}] |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/opx_cps_module.html