mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fc6d85e4cf
* new module: AIX LVM file system and NFS This module creates, removes, mount and unmount LVM and NFS file system for AIX using /etc/filesystems. For LVM file systems is also possible to resize the file system. * better parameters options structure better parameters options structure * Improved file system resize returns Added better tratment for return codes for file system resize. When a resize is not possible because no enough space on lv or shrink is not allowed. * improved doc and creation file system return code - improved doc - creation file system return code 10 was treated. * Doc recomendations, dict result, line limit - Added doc recomendations - Changed return to dict results on main() - Using 159 columns for code limit * wrong changed return when file system is already Fixed wrong changed return when file system is already mounted. When the file system is already mounted the return for changed is False. * Fixed description and included playbook for tests - Fixed description - Included playbook for manual tests * Various small bits to get this merged ASAP * Rename test/legacy/aix_filesystem.yml to test/integration/targets/aix_filesystem/tasks/main.yml Move integration test to its proper location * Create aliases * Fix CI issues
124 lines
2.9 KiB
YAML
124 lines
2.9 KiB
YAML
---
|
|
- name: Testing aix_filesystem module.
|
|
hosts: lpar24
|
|
tasks:
|
|
- name: Umounting /testfs
|
|
aix_filesystem:
|
|
filesystem: /testfs
|
|
state: unmounted
|
|
|
|
- name: Removing /testfs
|
|
aix_filesystem:
|
|
filesystem: /testfs
|
|
state: absent
|
|
|
|
- name: Creating a new file system
|
|
aix_filesystem:
|
|
filesystem: /newfs
|
|
size: 1G
|
|
state: present
|
|
vg: datavg
|
|
|
|
# It requires a host (nfshost) exporting the NFS
|
|
- name: Creating NFS filesystem from nfshost (Linux NFS server)
|
|
aix_filesystem:
|
|
device: /home/ftp
|
|
nfs_server: nfshost
|
|
filesystem: /nfs/ftp
|
|
state: present
|
|
|
|
# It requires a volume group named datavg (next three actions)
|
|
- name: Creating a logical volume testlv (aix_lvol module)
|
|
aix_lvol:
|
|
vg: datavg
|
|
lv: testlv
|
|
size: 2G
|
|
state: present
|
|
|
|
- name: Create filesystem in a previously defined logical volume
|
|
aix_filesystem:
|
|
device: testlv
|
|
filesystem: /testfs
|
|
state: present
|
|
|
|
- name: Create an already existing filesystem using existing logical volume.
|
|
aix_filesystem:
|
|
vg: datavg
|
|
device: mksysblv
|
|
filesystem: /mksysb
|
|
state: present
|
|
|
|
- name: Create a filesystem in a non-existing VG
|
|
aix_filesystem:
|
|
vg: nonexistvg
|
|
filesystem: /newlv
|
|
state: present
|
|
|
|
- name: Resizing /mksysb to 1G
|
|
aix_filesystem:
|
|
filesystem: /mksysb
|
|
size: 1G
|
|
state: present
|
|
|
|
- name: Resizing /mksysb to +512M
|
|
aix_filesystem:
|
|
filesystem: /mksysb
|
|
size: +512M
|
|
state: present
|
|
|
|
- name: Resizing /mksysb to 11G
|
|
aix_filesystem:
|
|
filesystem: /mksysb
|
|
size: 11G
|
|
state: present
|
|
|
|
- name: Resizing /mksysb to 11G (already done)
|
|
aix_filesystem:
|
|
filesystem: /mksysb
|
|
size: 11G
|
|
state: present
|
|
|
|
- name: Resizing /mksysb to -2G
|
|
aix_filesystem:
|
|
filesystem: /mksysb
|
|
size: -2G
|
|
state: present
|
|
|
|
- name: Resizing /mksysb to 100G (no enought space)
|
|
aix_filesystem:
|
|
filesystem: /mksysb
|
|
size: +100G
|
|
state: present
|
|
|
|
- name: Unmount filesystem /home/ftp
|
|
aix_filesystem:
|
|
filesystem: /home/ftp
|
|
state: unmounted
|
|
|
|
- name: Remove NFS filesystem /home/ftp
|
|
aix_filesystem:
|
|
filesystem: /home/ftp
|
|
rm_mount_point: yes
|
|
state: absent
|
|
|
|
- name: Mount filesystem /newfs
|
|
aix_filesystem:
|
|
filesystem: /newfs
|
|
state: mounted
|
|
|
|
- name: Remove mounted /newfs
|
|
aix_filesystem:
|
|
filesystem: /newfs
|
|
rm_mount_point: yes
|
|
state: absent
|
|
|
|
- name: Umount /newfs
|
|
aix_filesystem:
|
|
filesystem: /newfs
|
|
state: unmounted
|
|
|
|
- name: Remove /newfs
|
|
aix_filesystem:
|
|
filesystem: /newfs
|
|
rm_mount_point: yes
|
|
state: absent
|