Fix integration test role syntax.
This does not fix the tests themselves, only the syntax (converting from playbooks to roles). The aix_devices test fails due to use of unsupported state values.
This commit is contained in:
parent
94ef24974a
commit
cb0ca89994
2 changed files with 163 additions and 173 deletions
|
@ -1,77 +1,71 @@
|
||||||
---
|
- name: Scan new devices.
|
||||||
- name: AIX devices tests
|
aix_devices:
|
||||||
hosts: localhost
|
device: all
|
||||||
connection: local
|
state: present
|
||||||
|
|
||||||
tasks:
|
- name: Scan new virtual devices (vio0).
|
||||||
- name: Scan new devices.
|
aix_devices:
|
||||||
aix_devices:
|
device: vio0
|
||||||
device: all
|
state: present
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Scan new virtual devices (vio0).
|
- name: Removing IP alias to en0
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: vio0
|
device: en0
|
||||||
state: present
|
attributes:
|
||||||
|
delalias4: 10.0.0.100,255.255.255.0
|
||||||
|
|
||||||
- name: Removing IP alias to en0
|
- name: Removes ent2.
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: en0
|
device: ent2
|
||||||
attributes:
|
state: absent
|
||||||
delalias4: 10.0.0.100,255.255.255.0
|
|
||||||
|
|
||||||
- name: Removes ent2.
|
- name: Put device en2 in Defined
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: ent2
|
device: en2
|
||||||
state: absent
|
state: defined
|
||||||
|
|
||||||
- name: Put device en2 in Defined
|
- name: Removes ent4 (inexistent).
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: en2
|
device: ent4
|
||||||
state: defined
|
state: absent
|
||||||
|
|
||||||
- name: Removes ent4 (inexistent).
|
- name: Put device en4 in Defined (inexistent)
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: ent4
|
device: en4
|
||||||
state: absent
|
state: defined
|
||||||
|
|
||||||
- name: Put device en4 in Defined (inexistent)
|
- name: Put vscsi1 and children devices in Defined state.
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: en4
|
device: vscsi1
|
||||||
state: defined
|
recursive: yes
|
||||||
|
state: defined
|
||||||
|
|
||||||
- name: Put vscsi1 and children devices in Defined state.
|
- name: Removes vscsi1 and children devices.
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: vscsi1
|
device: vscsi1
|
||||||
recursive: yes
|
recursive: yes
|
||||||
state: defined
|
state: absent
|
||||||
|
|
||||||
- name: Removes vscsi1 and children devices.
|
- name: Changes en1 mtu to 9000 and disables arp.
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: vscsi1
|
device: en1
|
||||||
recursive: yes
|
attributes:
|
||||||
state: absent
|
mtu: 900
|
||||||
|
arp: off
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Changes en1 mtu to 9000 and disables arp.
|
- name: Configure IP, netmask and set en1 up.
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: en1
|
device: en1
|
||||||
attributes:
|
attributes:
|
||||||
mtu: 900
|
netaddr: 192.168.0.100
|
||||||
arp: off
|
netmask: 255.255.255.0
|
||||||
state: present
|
state: up
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Configure IP, netmask and set en1 up.
|
- name: Adding IP alias to en0
|
||||||
aix_devices:
|
aix_devices:
|
||||||
device: en1
|
device: en0
|
||||||
attributes:
|
attributes:
|
||||||
netaddr: 192.168.0.100
|
alias4: 10.0.0.100,255.255.255.0
|
||||||
netmask: 255.255.255.0
|
state: present
|
||||||
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
|
|
||||||
|
|
|
@ -1,124 +1,120 @@
|
||||||
---
|
- name: Umounting /testfs
|
||||||
- name: Testing aix_filesystem module.
|
aix_filesystem:
|
||||||
hosts: lpar24
|
filesystem: /testfs
|
||||||
tasks:
|
state: unmounted
|
||||||
- name: Umounting /testfs
|
|
||||||
aix_filesystem:
|
|
||||||
filesystem: /testfs
|
|
||||||
state: unmounted
|
|
||||||
|
|
||||||
- name: Removing /testfs
|
- name: Removing /testfs
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /testfs
|
filesystem: /testfs
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Creating a new file system
|
- name: Creating a new file system
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /newfs
|
filesystem: /newfs
|
||||||
size: 1G
|
size: 1G
|
||||||
state: present
|
state: present
|
||||||
vg: datavg
|
vg: datavg
|
||||||
|
|
||||||
# It requires a host (nfshost) exporting the NFS
|
# It requires a host (nfshost) exporting the NFS
|
||||||
- name: Creating NFS filesystem from nfshost (Linux NFS server)
|
- name: Creating NFS filesystem from nfshost (Linux NFS server)
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
device: /home/ftp
|
device: /home/ftp
|
||||||
nfs_server: nfshost
|
nfs_server: nfshost
|
||||||
filesystem: /nfs/ftp
|
filesystem: /nfs/ftp
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
# It requires a volume group named datavg (next three actions)
|
# It requires a volume group named datavg (next three actions)
|
||||||
- name: Creating a logical volume testlv (aix_lvol module)
|
- name: Creating a logical volume testlv (aix_lvol module)
|
||||||
aix_lvol:
|
aix_lvol:
|
||||||
vg: datavg
|
vg: datavg
|
||||||
lv: testlv
|
lv: testlv
|
||||||
size: 2G
|
size: 2G
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Create filesystem in a previously defined logical volume
|
- name: Create filesystem in a previously defined logical volume
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
device: testlv
|
device: testlv
|
||||||
filesystem: /testfs
|
filesystem: /testfs
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Create an already existing filesystem using existing logical volume.
|
- name: Create an already existing filesystem using existing logical volume.
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
vg: datavg
|
vg: datavg
|
||||||
device: mksysblv
|
device: mksysblv
|
||||||
filesystem: /mksysb
|
filesystem: /mksysb
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Create a filesystem in a non-existing VG
|
- name: Create a filesystem in a non-existing VG
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
vg: nonexistvg
|
vg: nonexistvg
|
||||||
filesystem: /newlv
|
filesystem: /newlv
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Resizing /mksysb to 1G
|
- name: Resizing /mksysb to 1G
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /mksysb
|
filesystem: /mksysb
|
||||||
size: 1G
|
size: 1G
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Resizing /mksysb to +512M
|
- name: Resizing /mksysb to +512M
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /mksysb
|
filesystem: /mksysb
|
||||||
size: +512M
|
size: +512M
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Resizing /mksysb to 11G
|
- name: Resizing /mksysb to 11G
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /mksysb
|
filesystem: /mksysb
|
||||||
size: 11G
|
size: 11G
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Resizing /mksysb to 11G (already done)
|
- name: Resizing /mksysb to 11G (already done)
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /mksysb
|
filesystem: /mksysb
|
||||||
size: 11G
|
size: 11G
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Resizing /mksysb to -2G
|
- name: Resizing /mksysb to -2G
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /mksysb
|
filesystem: /mksysb
|
||||||
size: -2G
|
size: -2G
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Resizing /mksysb to 100G (no enought space)
|
- name: Resizing /mksysb to 100G (no enought space)
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /mksysb
|
filesystem: /mksysb
|
||||||
size: +100G
|
size: +100G
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Unmount filesystem /home/ftp
|
- name: Unmount filesystem /home/ftp
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /home/ftp
|
filesystem: /home/ftp
|
||||||
state: unmounted
|
state: unmounted
|
||||||
|
|
||||||
- name: Remove NFS filesystem /home/ftp
|
- name: Remove NFS filesystem /home/ftp
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /home/ftp
|
filesystem: /home/ftp
|
||||||
rm_mount_point: yes
|
rm_mount_point: yes
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Mount filesystem /newfs
|
- name: Mount filesystem /newfs
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /newfs
|
filesystem: /newfs
|
||||||
state: mounted
|
state: mounted
|
||||||
|
|
||||||
- name: Remove mounted /newfs
|
- name: Remove mounted /newfs
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /newfs
|
filesystem: /newfs
|
||||||
rm_mount_point: yes
|
rm_mount_point: yes
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Umount /newfs
|
- name: Umount /newfs
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /newfs
|
filesystem: /newfs
|
||||||
state: unmounted
|
state: unmounted
|
||||||
|
|
||||||
- name: Remove /newfs
|
- name: Remove /newfs
|
||||||
aix_filesystem:
|
aix_filesystem:
|
||||||
filesystem: /newfs
|
filesystem: /newfs
|
||||||
rm_mount_point: yes
|
rm_mount_point: yes
|
||||||
state: absent
|
state: absent
|
||||||
|
|
Loading…
Reference in a new issue