|
| 1 | +--- |
| 2 | +- name: Install the VIOS version 3.1.0.10 after copying the image from remote server to Power HMC disk |
| 3 | + hosts: hmcs |
| 4 | + connection: local |
| 5 | + vars: |
| 6 | + curr_hmc_auth: |
| 7 | + username: hscroot |
| 8 | + password: !vault | |
| 9 | + $ANSIBLE_VAULT;1.1;AES256 |
| 10 | + 34656335616165343966323739633761653065346138623233633764353636373063313736373563 |
| 11 | + 6130373162376464666634363734303164396364656535350a663661636663323434386466383634 |
| 12 | + 63323432303833643864396130393133346666336661346432356433353035663038643833373332 |
| 13 | + 3664333762656138640a306539363765343261383363346532643639383938656434333564323139 |
| 14 | + 6365 |
| 15 | +
|
| 16 | + tasks: |
| 17 | + - name: Copy vios installation image of 3.1.0.10 version from sftp location to HMC disk |
| 18 | + ibm.power_hmc.vios: |
| 19 | + hmc_host: '{{ inventory_hostname }}' |
| 20 | + hmc_auth: "{{ curr_hmc_auth }}" |
| 21 | + media: sftp |
| 22 | + directory_name: "vios_3.1.0.10" |
| 23 | + remote_server: <sftp_server_ip> |
| 24 | + sftp_auth: |
| 25 | + username: sftp_username |
| 26 | + password: sftp_password |
| 27 | + remote_directory: /home/hmcct/ |
| 28 | + files: |
| 29 | + - flash.iso |
| 30 | + action: copy |
| 31 | + register: testout |
| 32 | + |
| 33 | + - name: Stdout the result of copy |
| 34 | + ansible.builtin.debug: |
| 35 | + msg: '{{ testout }}' |
| 36 | + |
| 37 | + - name: Install the VIOS using image available in disk for 3.1.0.10 version |
| 38 | + ibm.power_hmc.vios: |
| 39 | + hmc_host: '{{ inventory_hostname }}' |
| 40 | + hmc_auth: '{{ curr_hmc_auth }}' |
| 41 | + system_name: <system-name> |
| 42 | + vios_IP: <vios_ip> |
| 43 | + name: <vios-name> |
| 44 | + image_dir: "vios_3.1.0.10" |
| 45 | + vios_iso: dvdimage.v1.iso |
| 46 | + vios_gateway: <gateway_ip> |
| 47 | + vios_subnetmask: <subnetmask_ip> |
| 48 | + network_macaddr: <mac_address> |
| 49 | + action: install |
| 50 | + register: output |
| 51 | + |
| 52 | + - name: Stdout the result of installation through disk |
| 53 | + ansible.builtin.debug: |
| 54 | + msg: '{{ output }}' |
0 commit comments