Skip to content

Commit e0ee129

Browse files
authored
Fix for issue #298 (#299)
Also, added playbook for alt_disk module. Signed-off-by: schamola <[email protected]>
1 parent 872ac8a commit e0ee129

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

playbooks/demo_alt_disk.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
- name: "Alt_Disk in AIX"
3+
hosts: "{{ hosts_val }}"
4+
gather_facts: no
5+
vars:
6+
hosts_val: all
7+
targets_val: hdisk1
8+
tasks:
9+
# - name: Perform an alternate disk copy of the rootvg to hdisk1
10+
# alt_disk:
11+
# action: copy
12+
# targets: "{{ targets_val }}"
13+
14+
# - name: Perform an alternate disk copy of the rootvg to the smallest disk that can be selected
15+
# alt_disk:
16+
# action: copy
17+
# disk_size_policy: minimize
18+
19+
# - name: Perform a cleanup of any existing alternate disk copy and old rootvg
20+
# alt_disk:
21+
# action: clean
22+
# allow_old_rootvg: yes
23+
24+
- name: Creating alt_disk_copy on a disk with minimize disk_size_policy
25+
alt_disk:
26+
action: copy
27+
disk_size_policy: minimize
28+
force: true
29+
30+
- name: Perform a cleanup of any existing alternate disk copy
31+
alt_disk:
32+
action: clean

plugins/modules/alt_disk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def main():
635635
allow_old_rootvg = module.params['allow_old_rootvg']
636636

637637
if action == 'copy':
638-
alt_disk_copy(module, module.params, targets)
638+
alt_disk_copy(module, module.params, targets, allow_old_rootvg)
639639
else:
640640
alt_disk_clean(module, targets, allow_old_rootvg)
641641

0 commit comments

Comments
 (0)