You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/aix_devices/tasks/main.yml

78 lines
1.6 KiB
YAML

new module: aix_devices, manage AIX devices (#32290) * new module: aix_devices AIX devices management This module discovery, defines, removes and modifies attributes of AIX devices. * Added hide attributes that can be used for aliases Added hid attributes that can be used to manage aliases on en interfaces. * After tests: docs and attributes tests Fixed attributes tests and doc explaining how to use attributes with comma. * Fixed grammar on module description Fixed grammar on module description * Included test/legacy/aix_devices.yml for tests As discussed on IRC ansible-devel channes, was include the legacy tests for further manual tests. * Added 'attributes' as dictionary Added 'attributes' as a dictionary makes the configuration simple. * Changed the added version from 2.5 to 2.7 Fixed the shippable error from 2.5 to 2.7 ``` 2018-06-01 08:28:02 ERROR: Found 1 validate-modules issue(s) which need to be resolved: 2018-06-01 08:28:02 ERROR: lib/ansible/modules/system/aix_devices.py:0:0: E307 version_added should be 2.7. Currently 2.5 (75%) ``` * Various changes * Revert * Changed the tests to integration dir * Implement 'available' state 'available' state is the AIX state used, that works same as 'present' * The states were changed to AIX expressions and kept Ansible states. Makes sense keep the states names to AIX and use the Ansible 'standards' states. 'available' is 'present' 'removed' is 'absent' It makes easy to AIX sysadmins use the module, however it keep the Ansible meanings. * Fixed choices according with latest patchset (commit) * A few doc changes Nothing material
6 years ago
---
- name: AIX devices tests
hosts: localhost
connection: local
tasks:
- name: Scan new devices.
aix_devices:
device: all
state: present
- name: Scan new virtual devices (vio0).
aix_devices:
device: vio0
state: present
- name: Removing IP alias to en0
aix_devices:
device: en0
attributes:
delalias4: 10.0.0.100,255.255.255.0
- name: Removes ent2.
aix_devices:
device: ent2
state: absent
- name: Put device en2 in Defined
aix_devices:
device: en2
state: defined
- name: Removes ent4 (inexistent).
aix_devices:
device: ent4
state: absent
- name: Put device en4 in Defined (inexistent)
aix_devices:
device: en4
state: defined
- name: Put vscsi1 and children devices in Defined state.
aix_devices:
device: vscsi1
recursive: yes
state: defined
- name: Removes vscsi1 and children devices.
aix_devices:
device: vscsi1
recursive: yes
state: absent
- name: Changes en1 mtu to 9000 and disables arp.
aix_devices:
device: en1
attributes:
mtu: 900
arp: off
state: present
- name: Configure IP, netmask and set en1 up.
aix_devices:
device: en1
attributes:
netaddr: 192.168.0.100
netmask: 255.255.255.0
state: up
state: present
- name: Adding IP alias to en0
aix_devices:
device: en0
attributes:
alias4: 10.0.0.100,255.255.255.0
state: present