User Tools

Site Tools


ansible:ansible_for_aix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ansible:ansible_for_aix [2022/06/20 17:12]
manu [First solution]
ansible:ansible_for_aix [2024/10/10 14:28] (current)
manu
Line 1: Line 1:
 ====== Ansible for AIX ====== ====== Ansible for AIX ======
  
-https://www.ansible.com/​blog/aix-patch-management-with-ansible+https://galaxy.ansible.com/​ui/​repo/​published/​ibm/​power_aix/
  
-https://​galaxy.ansible.com/​search?​deprecated=false&​keywords=aix&​order_by=-relevance&​page=1+https://​galaxy.ansible.com/​ui/​repo/​published/​ibm/​power_vios/​ 
 + 
 +https://​galaxy.ansible.com/​ui/​repo/​published/​ibm/​power_hmc/​ 
 + 
 +https://​galaxy.ansible.com/​ui/​repo/​published/​brocade/​fos/​ 
 + 
 +https://​galaxy.ansible.com/​ui/​repo/​published/​ibm/​storage_virtualize/​ 
 + 
 +https://​www.ansible.com/​blog/​aix-patch-management-with-ansible
  
 https://​github.com/​aixoss/​ansible-playbooks https://​github.com/​aixoss/​ansible-playbooks
  
 https://​github.com/​IBM/​ansible-power-aix-oracle https://​github.com/​IBM/​ansible-power-aix-oracle
 +
 +https://​github.com/​IBM/​ansible-power-hmc
 +
 +https://​github.com/​lg4U ​  ​(PowerVC)
 +
 +If server is installed on AIX, then install prerequisites AIX packages:
 +    * bos.loc.com.utf
 +    * bos.loc.utf.EN_US
 +  And set LANG: export LANG=en_US.UTF-8
 +
  
   $ ansible-galaxy collection install ibm.power_aix   $ ansible-galaxy collection install ibm.power_aix
Line 408: Line 426:
 Using **shell**, mount and umount Using **shell**, mount and umount
 <cli prompt='>'>​ <cli prompt='>'>​
-[root@aix200]/​root>​ cat mount_nfs.yml+[root@aix200]/​root>​ cat mksysb_nfs.yml
 --- ---
 - name: "Run Mksysb"​ - name: "Run Mksysb"​
Line 523: Line 541:
  
 To see the full debug log messages you should set the selector field to user.debug and run the playbook with the environment variable ANSIBLE_DEBUG=1 To see the full debug log messages you should set the selector field to user.debug and run the playbook with the environment variable ANSIBLE_DEBUG=1
-<cli prompt='​#'>+<cli prompt='​$'>
 $ vi /​etc/​syslog.conf $ vi /​etc/​syslog.conf
 user.debug /​var/​log/​syslog.user.debug rotate size 1m files 4 compress user.debug /​var/​log/​syslog.user.debug rotate size 1m files 4 compress
Line 531: Line 549:
 </​cli>​ </​cli>​
  
-==== Examples ====+===== Examples ​=====
  
-=== Upgrade AIX NIM ===+==== Upgrade AIX NIM ====
  
 <cli prompt='#'>​ <cli prompt='#'>​
Line 565: Line 583:
 </​cli>​ </​cli>​
  
-=== mksysb AIX NIM ===+==== mksysb AIX NIM ====
  
 <cli prompt='#'>​ <cli prompt='#'>​
Line 597: Line 615:
 </​cli>​ </​cli>​
  
 +==== AIX NIMadm alternate disk migration ====
  
 +Below is an example of how to invoke the options. I'd added the "​default('​N/​A'​)"​ to avoid errors if the variable was not defined, as the role is coded for "​N/​A",​ but should also work with "​default(omit)"​
 +<cli>
 +- name: Include nim_alt_disk_migration role
 +  include_role:​
 +    name: nim_alt_disk_migration
 +    apply:
 +      delegate_to:​ "{{ NIM_Master }}"
 +      connection: ​ "{{ NIM_Conn }}"
 +  vars:
 +    nim_client: ​     "{{ NIM_Client }}"
 +    target_disk:​
 +      disk_name: ​    "​{{ Target_DISK.disk_name }}"
 +      force: ​        "​{{ NIMADM_Force }}"
 +    lpp_source: ​     "{{ Target_LPPS }}"
 +    spot:            "{{ Target_SPOT }}"
 +    nim_mast_lpp: ​   "{{ NIM_Mast_LPP }}"
 +    nimadm_cache_vg:​ "{{ NIMADM_VG | default('​N/​A'​) }}"
 +    nimadm_bundle: ​  "​{{ Target_eFix | default('​N/​A'​) }}"
 +    nimadm_bidata: ​  "​{{ BOS_Inst_Data | default('​N/​A'​) }}"
 +    control_phases:​
 +      validate_nim_resources:​ "{{ NIM_Res_Check }}"
 +      perform_migration: ​     "{{ NIM_Migration }}
 +    debug_skip_nimadm: ​       "{{ Skip_nimadm }}"
 +</​cli>​
 +
 +<cli>
 +# ansible-galaxy collection list ibm.power_aix
 +# /​.ansible/​collections/​ansible_collections
 +Collection ​   Version
 +------------- -------
 +ibm.power_aix 1.8.1
 +</​cli> ​
 +
 +This Ansible role, nim_alt_disk_migration,​ can be used for “migrating an alternate disk to a higher AIX level”.
 +
 +Here’s the playbook I used, called **nimadm.yml**:​
 +<​cli> ​
 +---
 +- name: NIMADM playbook
 +  hosts: aixmig
 +  gather_facts:​ no
 +  collections:​
 +    ibm.power_aix
 +  tasks:
 +    - include_role:​
 +        name: nim_alt_disk_migration
 +        apply:
 +          delegate_to:​ lpar1
 +      vars:
 +        nimadm_cache_vg:​ nimadmvg
 +        nim_client: aixmig
 +        target_disk:​
 +          disk_name: hdisk0
 +        lpp_source: AIX73TL1SP1
 +        spot: spotAIX73TL1SP1
 +      register: nimadm_results
 +    - name: "​Debug:​ nimadm_results"​
 +      ansible.builtin.debug:​ var=nimadm_results
 +</​cli> ​
ansible/ansible_for_aix.1655737946.txt.gz · Last modified: 2022/06/20 17:12 by manu