2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AIX の ifix 適用を Ansible で実行

Last updated at Posted at 2025-08-15

はじめに

AIXサーバーを多数管理する環境において、HIPER APAR (修正を実施した方が良い重大なバグ) や暫定fix(ifix)の適用は、時間と手間のかかる重要な作業です。手作業による適用は、作業負荷が高いだけでなく、ヒューマン・オペレーション・ミスのリスクも伴います。


この記事では、こうした課題をAnsibleを用いて解決する方法を記載します。
効率的にifixを適用するための、再利用可能なPlaybookの作成手順を、実際のコードと実行結果をご紹介します。


環境

Ansible サーバー:RHEL 8.6 (ppc64le)

対象サーバー: AIX 7300-01-01-2246


Ansible playbook

構造

<ansible home>
│
├── aix_ifix.yml
├── ansible.cfg
├── inventory
│   └── test.yml
│
├── group_vars
│   └── aix_ifix_vars.yml  # 変数ファイル
│
└── roles
    └── aix_ifix
         └── tasks
            └── main.yml
  • このplaybookの例は、1度に1つの ifix を適用する例です。
  • 実行サーバーは inventory の記載次第のため、複数台には対応できます。
  • 複数の ifix 適用を実行したい場合は 変数ファイルを複数用意して、複数回の実行で各回別の変数ファイルを指定する実行方法で対応する想定です。
  • ibm.power_aix.aix_emgr モジュールが存在していますが、当環境で正しく動作できなかったので、shell モジュールで playbook を作成しています。(PD に時間を割くことを回避しました)

Playbook定義

・ifix 適用後のリブートは手動実行(HMCから実行) を想定します。

  • <ansible home>/ansible.cfg
ansible.cfg
[defaults]
inventory = ./inventory/test.yml
deprecation_warnings=False
host_key_checking = False
#vault_password_file = /root/.vault/automation.vault
verbosity = 1
#stdout_callback = debug
callback_whitelist = profile_tasks
interpreter_python='/bin/env LANG=C python3'
# skip のログを非表示にする
display_skipped_hosts = no
# ok のログを非表示にする
display_ok_hosts = no
collections_paths = /root/.ansible/collections/ansible_collections/

[privilege_escalation]
become = True
become_method = sudo
become_user = root
becom_ask_pass = False

[ssh_connection]
ssh_args ='-o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
  • <ansible home>/test.yml
inventory/test.yml
[aix]
AIX73  ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa_ansible

ホスト名 AIX73 は /etc/hosts で名前解決しています。

  • <ansible home>/group_vars/aix_ifix_vars.yml
aix_ifix_vars.yml
local_ifix_file: "/work/IJ44749m1a.230210.AIX73TL01SP01.epkg.Z" # iFix ファイルのパス
remote_dir: "/ifix_temp"
remote_ifix_file: "/ifix_temp/IJ44749m1a.230210.AIX73TL01SP01.epkg.Z"
action: install              # インストールアクション
emgr_id: "IJ44749m1a"           # iFix の識別子 (例: APAR 番号)
min_free_space_mb: 50
  • <ansible home>/aix_ifix.yml
---
- name: Apply ifix
  hosts: "{{ target_hosts | default('test') }}"
  gather_facts: no
  become: yes

  roles:
    - role: aix_ifix
  • <ansible home>/roles/aix_ifix/tasks/main.yml
---
# ----------------------------------------------------------------
# 1. 事前チェック: ファイルシステムの空き容量を確認
# ----------------------------------------------------------------
- name: Check available space in /(root) filesystem
  command: df -m /
  register: df_output
  changed_when: false # このタスクは状態を変更しないため changed にしない

- name: Parse available space from df output
  set_fact:
    root_available_space_mb: "{{ df_output.stdout_lines[-1].split()[2] }}"

- name: Fail if available space is less than the required minimum
  fail:
    msg: "Not enough space in /(root). Required: {{ min_free_space_mb }} MB, Available: {{ root_available_space_mb }} MB"
  when: root_available_space_mb | int < min_free_space_mb


# ----------------------------------------------------------------
# 2. メイン処理: iFixの適用とクリーンアップを堅牢に実行
#    block/always を使用し、処理の成功・失敗に関わらず後処理を行う
# ----------------------------------------------------------------
- name: Manage iFix installation and cleanup
  block:
    # ------------------------------------------
    # 2-1. 準備フェーズ
    # ------------------------------------------
    - name: Create temporary directory for iFix file
      file:
        path: "{{ remote_dir }}"
        state: directory
        owner: root
        group: system
        mode: '0755'

    - name: Transfer iFix file to AIX host
      copy:
        src: "{{ local_ifix_file }}"
        dest: "{{ remote_ifix_file }}"

    # ------------------------------------------
    # 2-2. べき等性の確保とiFix適用
    # ------------------------------------------
    - name: Check if iFix is already applied
      shell: emgr -l
      register: applied_ifixes
      changed_when: false
      check_mode: no # Dry-Runでも状態確認は実行する

    - name: Apply iFix using emgr (if not already applied)
      shell: emgr -e "{{ remote_ifix_file }}" -X
      register: emgr_result
      # 変数 emgr_id が emgr -l の出力に含まれていない場合のみ実行
      when: "emgr_id not in applied_ifixes.stdout"

    # ------------------------------------------
    # 2-3. 結果の表示
    # ------------------------------------------
    - name: Display message if iFix was applied successfully
      debug:
        msg: "iFix {{ emgr_id }} has been successfully applied. A reboot may be required."
      when: emgr_result.changed

    - name: Display message if iFix was already applied
      debug:
        msg: "iFix {{ emgr_id }} is already applied. Skipping installation."
      when: not emgr_result.changed

  always:
    # ------------------------------------------
    # 2-4. 後処理 (クリーンアップ)
    #      このブロックはメイン処理が成功しても失敗しても必ず実行される
    # ------------------------------------------
    - name: Clean up temporary files and directory on remote host
      block:
        - name: Remove iFix file from remote host
          file:
            path: "{{ remote_ifix_file }}"
            state: absent

        - name: Remove temporary directory from remote host
          file:
            path: "{{ remote_dir }}"
            state: absent
      # クリーンアップ処理でエラーが発生してもPlaybook全体を停止させない
      ignore_errors: yes


ifix 適用 playbook の実行

# ansible-playbook aix_ifix.yml -e "@./group_vars/aix_ifix_vars.yml" -e "target_hosts=aix"

Using /work/ansible-test/ansible.cfg as config file
[WARNING]: Found variable using reserved name: action

PLAY [Apply ifix] **************************************************************
Thursday 14 August 2025  22:53:23 -0400 (0:00:00.046)       0:00:00.046 *******
Thursday 14 August 2025  22:53:23 -0400 (0:00:00.558)       0:00:00.605 *******
Thursday 14 August 2025  22:53:23 -0400 (0:00:00.010)       0:00:00.615 *******
Thursday 14 August 2025  22:53:23 -0400 (0:00:00.009)       0:00:00.625 *******

TASK [aix_ifix : Create temporary directory for iFix file] *********************
changed: [AIX73] => {"changed": true, "gid": 0, "group": "system", "mode": "0755", "owner": "root", "path": "/ifix_temp", "size": 256, "state": "directory", "uid": 0}
Thursday 14 August 2025  22:53:24 -0400 (0:00:00.513)       0:00:01.139 *******

TASK [aix_ifix : Transfer iFix file to AIX host] *******************************
changed: [AIX73] => {"changed": true, "checksum": "a7ab5f0157d07c59c0c5838f8594cc2a8586803e", "dest": "/ifix_temp/IJ44749m1a.230210.AIX73TL01SP01.epkg.Z", "gid": 0, "group": "system", "md5sum": "fec1e26c9ccc4b5dfcce63a55608cad6", "mode": "0644", "owner": "root", "size": 11283726, "src": "/.ansible/tmp/ansible-tmp-1755226404.4088836-1407-143280900800814/source", "state": "file", "uid": 0}
Thursday 14 August 2025  22:53:25 -0400 (0:00:01.272)       0:00:02.411 *******
Thursday 14 August 2025  22:53:26 -0400 (0:00:00.700)       0:00:03.111 *******

TASK [aix_ifix : Apply iFix using emgr (if not already applied)] ***************
changed: [AIX73] => {"changed": true, "cmd": "emgr -e \"/ifix_temp/IJ44749m1a.230210.AIX73TL01SP01.epkg.Z\" -X", "delta": "0:00:16.667224", "end": "2019-10-07 00:55:26.555013", "rc": 0, "start": "2019-10-07 00:55:09.887789", "stderr": "ATTENTION: system reboot is required. Please see the \"Reboot Processing\"\nsections in the output above or in the /var/adm/ras/emgr.log file.", "stderr_lines": ["ATTENTION: system reboot is required. Please see the \"Reboot Processing\"", "sections in the output above or in the /var/adm/ras/emgr.log file."], "stdout": "+-----------------------------------------------------------------------------+\nEfix Manager Initialization\n+-----------------------------------------------------------------------------+\nInitializing log /var/adm/ras/emgr.log ...\nEfix package file is: /ifix_temp/IJ44749m1a.230210.AIX73TL01SP01.epkg.Z\nMD5 generating command is /usr/bin/csum\nMD5 checksum is fec1e26c9ccc4b5dfcce63a55608cad6\nAccessing efix metadata ...\nProcessing efix label \"IJ44749m1a\" ...\nVerifying efix control file ...\n\n+-----------------------------------------------------------------------------+\nInstallp Prerequisite Verification\n+-----------------------------------------------------------------------------+\nVerifying prerequisite file ...\nChecking prerequisites ...\n\nPrerequisite Number: 1\n   Fileset: bos.net.tcp.client_core\n   Minimal Level: 7.3.1.1\n   Maximum Level: 7.3.1.1\n   Actual Level: 7.3.1.1\n   Type: PREREQ\n   Requisite Met: yes\n\nPrerequisite Number: 2\n   Fileset: bos.mp64\n   Minimal Level: 7.3.1.1\n   Maximum Level: 7.3.1.1\n   Actual Level: 7.3.1.1\n   Type: PREREQ\n   Requisite Met: yes\n\nAll prerequisites have been met.\n\n+-----------------------------------------------------------------------------+\nProcessing APAR reference file\n+-----------------------------------------------------------------------------+\nATTENTION: Interim fix is enabled for automatic removal by installp.\n\n+-----------------------------------------------------------------------------+\nEfix Attributes\n+-----------------------------------------------------------------------------+\nLABEL:            IJ44749m1a\nPACKAGING DATE:   Fri Feb 10 09:40:22 CST 2023\nABSTRACT:         ifix for case TS011611179\nPACKAGER VERSION: 7\nVUID:             00F7CD554C00021009021923\nREBOOT REQUIRED:  yes\nBUILD BOOT IMAGE: yes\nLU CAPABLE:       yes\nPRE-REQUISITES:   yes\nSUPERSEDE:        no\nPACKAGE LOCKS:    no\nE2E PREREQS:      no\nFIX TESTED:       no\nALTERNATE PATH:   None\nEFIX FILES:       2\n\nInstall Scripts:\n   PRE_INSTALL:   no\n   POST_INSTALL:  no\n   PRE_REMOVE:    no\n   POST_REMOVE:   no\n\nFile Number:      1\n   LOCATION:      /usr/lib/drivers/netinet\n   FILE TYPE:     Standard (file or executable)\n   INSTALLER:     installp\n   SIZE:          2720\n   ACL:           DEFAULT\n   CKSUM:         65328\n   PACKAGE:       bos.net.tcp.client_core\n   MOUNT INST:    no\n\nFile Number:      2\n   LOCATION:      /usr/lib/boot/unix_64\n   FILE TYPE:     Standard (file or executable)\n   INSTALLER:     installp\n   SIZE:          101112\n   ACL:           DEFAULT\n   CKSUM:         52807\n   PACKAGE:       bos.mp64\n   MOUNT INST:    no\n\n+-----------------------------------------------------------------------------+\nEfix Description\n+-----------------------------------------------------------------------------+\nIJ44761 - Memory leak\nIJ44749 - lpar crashed @gids_ok\nIJ44758 - lpar crashed @.disable_lock\nIJ45340 - crash in tcp_output\n\n+-----------------------------------------------------------------------------+\nEfix Lock Management\n+-----------------------------------------------------------------------------+\nChecking locks for file /usr/lib/drivers/netinet ...\nChecking locks for file /usr/lib/boot/unix_64 ...\n\nAll files have passed lock checks.\n\n+-----------------------------------------------------------------------------+\nSpace Requirements\n+-----------------------------------------------------------------------------+\nChecking space requirements ...\n\nSpace statistics (in 512 byte-blocks):\nFile system: /usr, Free: 1391624, Required: 139850, Deficit: 0.\nFile system: /tmp, Free: 519712, Required: 190509, Deficit: 0.\n\n+-----------------------------------------------------------------------------+\nEfix Installation Setup\n+-----------------------------------------------------------------------------+\nUnpacking efix package file ...\nInitializing efix installation ...\n\n+-----------------------------------------------------------------------------+\nEfix State\n+-----------------------------------------------------------------------------+\nSetting efix state to: INSTALLING\n\n+-----------------------------------------------------------------------------+\nFile Archiving\n+-----------------------------------------------------------------------------+\nSaving all files that will be replaced ...\nSave directory is: /usr/emgrdata/efixdata/IJ44749m1a/save\nFile 1: Saving /usr/lib/drivers/netinet as EFSAVE1 ...\nFile 2: Saving /usr/lib/boot/unix_64 as EFSAVE2 ...\n\n+-----------------------------------------------------------------------------+\nEfix File Installation\n+-----------------------------------------------------------------------------+\nInstalling all efix files:\nInstalling efix file #1 (File: /usr/lib/drivers/netinet) ...\nInstalling efix file #2 (File: /usr/lib/boot/unix_64) ...\n\nTotal number of efix files installed is 2.\nAll efix files installed successfully.\n\n+-----------------------------------------------------------------------------+\nPackage Locking\n+-----------------------------------------------------------------------------+\nProcessing package locking for all files.\nFile 1: locking installp fileset bos.net.tcp.client_core.\nFile 2: locking installp fileset bos.mp64.\n\nAll package locks processed successfully.\n\n+-----------------------------------------------------------------------------+\nReboot Processing\n+-----------------------------------------------------------------------------+\n\n*** NOTICE ***\nThis efix package requires the target system to be rebooted after the current\noperation is complete. It is recommended that you reboot the target system as\nsoon as possible after installation to avoid disruption of current functionality.\n\n+-----------------------------------------------------------------------------+\nEfix State\n+-----------------------------------------------------------------------------+\nSetting efix state to: REBOOT REQUIRED\n\n+-----------------------------------------------------------------------------+\nBoot Image Processing\n+-----------------------------------------------------------------------------+\nRebuilding boot image ...\nbosboot: Boot image is 65564 512 byte blocks.\nSuccessfully rebuilt boot image.\n\n+-----------------------------------------------------------------------------+\nOperation Summary\n+-----------------------------------------------------------------------------+\nLog file is /var/adm/ras/emgr.log\n\nEPKG NUMBER       LABEL               OPERATION              RESULT            \n===========       ==============      =================      ==============    \n1                 IJ44749m1a          INSTALL                SUCCESS           \n\n\nReturn Status = SUCCESS", "stdout_lines": ["+-----------------------------------------------------------------------------+", "Efix Manager Initialization", "+-----------------------------------------------------------------------------+", "Initializing log /var/adm/ras/emgr.log ...", "Efix package file is: /ifix_temp/IJ44749m1a.230210.AIX73TL01SP01.epkg.Z", "MD5 generating command is /usr/bin/csum", "MD5 checksum is fec1e26c9ccc4b5dfcce63a55608cad6", "Accessing efix metadata ...", "Processing efix label \"IJ44749m1a\" ...", "Verifying efix control file ...", "", "+-----------------------------------------------------------------------------+", "Installp Prerequisite Verification", "+-----------------------------------------------------------------------------+", "Verifying prerequisite file ...", "Checking prerequisites ...", "", "Prerequisite Number: 1", "   Fileset: bos.net.tcp.client_core", "   Minimal Level: 7.3.1.1", "   Maximum Level: 7.3.1.1", "   Actual Level: 7.3.1.1", "   Type: PREREQ", "   Requisite Met: yes", "", "Prerequisite Number: 2", "   Fileset: bos.mp64", "   Minimal Level: 7.3.1.1", "   Maximum Level: 7.3.1.1", "   Actual Level: 7.3.1.1", "   Type: PREREQ", "   Requisite Met: yes", "", "All prerequisites have been met.", "", "+-----------------------------------------------------------------------------+", "Processing APAR reference file", "+-----------------------------------------------------------------------------+", "ATTENTION: Interim fix is enabled for automatic removal by installp.", "", "+-----------------------------------------------------------------------------+", "Efix Attributes", "+-----------------------------------------------------------------------------+", "LABEL:            IJ44749m1a", "PACKAGING DATE:   Fri Feb 10 09:40:22 CST 2023", "ABSTRACT:         ifix for case TS011611179", "PACKAGER VERSION: 7", "VUID:             00F7CD554C00021009021923", "REBOOT REQUIRED:  yes", "BUILD BOOT IMAGE: yes", "LU CAPABLE:       yes", "PRE-REQUISITES:   yes", "SUPERSEDE:        no", "PACKAGE LOCKS:    no", "E2E PREREQS:      no", "FIX TESTED:       no", "ALTERNATE PATH:   None", "EFIX FILES:       2", "", "Install Scripts:", "   PRE_INSTALL:   no", "   POST_INSTALL:  no", "   PRE_REMOVE:    no", "   POST_REMOVE:   no", "", "File Number:      1", "   LOCATION:      /usr/lib/drivers/netinet", "   FILE TYPE:     Standard (file or executable)", "   INSTALLER:     installp", "   SIZE:          2720", "   ACL:           DEFAULT", "   CKSUM:         65328", "   PACKAGE:       bos.net.tcp.client_core", "   MOUNT INST:    no", "", "File Number:      2", "   LOCATION:      /usr/lib/boot/unix_64", "   FILE TYPE:     Standard (file or executable)", "   INSTALLER:     installp", "   SIZE:          101112", "   ACL:           DEFAULT", "   CKSUM:         52807", "   PACKAGE:       bos.mp64", "   MOUNT INST:    no", "", "+-----------------------------------------------------------------------------+", "Efix Description", "+-----------------------------------------------------------------------------+", "IJ44761 - Memory leak", "IJ44749 - lpar crashed @gids_ok", "IJ44758 - lpar crashed @.disable_lock", "IJ45340 - crash in tcp_output", "", "+-----------------------------------------------------------------------------+", "Efix Lock Management", "+-----------------------------------------------------------------------------+", "Checking locks for file /usr/lib/drivers/netinet ...", "Checking locks for file /usr/lib/boot/unix_64 ...", "", "All files have passed lock checks.", "", "+-----------------------------------------------------------------------------+", "Space Requirements", "+-----------------------------------------------------------------------------+", "Checking space requirements ...", "", "Space statistics (in 512 byte-blocks):", "File system: /usr, Free: 1391624, Required: 139850, Deficit: 0.", "File system: /tmp, Free: 519712, Required: 190509, Deficit: 0.", "", "+-----------------------------------------------------------------------------+", "Efix Installation Setup", "+-----------------------------------------------------------------------------+", "Unpacking efix package file ...", "Initializing efix installation ...", "", "+-----------------------------------------------------------------------------+", "Efix State", "+-----------------------------------------------------------------------------+", "Setting efix state to: INSTALLING", "", "+-----------------------------------------------------------------------------+", "File Archiving", "+-----------------------------------------------------------------------------+", "Saving all files that will be replaced ...", "Save directory is: /usr/emgrdata/efixdata/IJ44749m1a/save", "File 1: Saving /usr/lib/drivers/netinet as EFSAVE1 ...", "File 2: Saving /usr/lib/boot/unix_64 as EFSAVE2 ...", "", "+-----------------------------------------------------------------------------+", "Efix File Installation", "+-----------------------------------------------------------------------------+", "Installing all efix files:", "Installing efix file #1 (File: /usr/lib/drivers/netinet) ...", "Installing efix file #2 (File: /usr/lib/boot/unix_64) ...", "", "Total number of efix files installed is 2.", "All efix files installed successfully.", "", "+-----------------------------------------------------------------------------+", "Package Locking", "+-----------------------------------------------------------------------------+", "Processing package locking for all files.", "File 1: locking installp fileset bos.net.tcp.client_core.", "File 2: locking installp fileset bos.mp64.", "", "All package locks processed successfully.", "", "+-----------------------------------------------------------------------------+", "Reboot Processing", "+-----------------------------------------------------------------------------+", "", "*** NOTICE ***", "This efix package requires the target system to be rebooted after the current", "operation is complete. It is recommended that you reboot the target system as", "soon as possible after installation to avoid disruption of current functionality.", "", "+-----------------------------------------------------------------------------+", "Efix State", "+-----------------------------------------------------------------------------+", "Setting efix state to: REBOOT REQUIRED", "", "+-----------------------------------------------------------------------------+", "Boot Image Processing", "+-----------------------------------------------------------------------------+", "Rebuilding boot image ...", "bosboot: Boot image is 65564 512 byte blocks.", "Successfully rebuilt boot image.", "", "+-----------------------------------------------------------------------------+", "Operation Summary", "+-----------------------------------------------------------------------------+", "Log file is /var/adm/ras/emgr.log", "", "EPKG NUMBER       LABEL               OPERATION              RESULT            ", "===========       ==============      =================      ==============    ", "1                 IJ44749m1a          INSTALL                SUCCESS           ", "", "", "Return Status = SUCCESS"]}
Thursday 14 August 2025  22:53:43 -0400 (0:00:17.112)       0:00:20.223 *******
Thursday 14 August 2025  22:53:43 -0400 (0:00:00.011)       0:00:20.235 *******
Thursday 14 August 2025  22:53:43 -0400 (0:00:00.009)       0:00:20.244 *******

TASK [aix_ifix : Remove iFix file from remote host] ****************************
changed: [AIX73] => {"changed": true, "path": "/ifix_temp/IJ44749m1a.230210.AIX73TL01SP01.epkg.Z", "state": "absent"}
Thursday 14 August 2025  22:53:43 -0400 (0:00:00.343)       0:00:20.588 *******

TASK [aix_ifix : Remove temporary directory from remote host] ******************
changed: [AIX73] => {"changed": true, "path": "/ifix_temp", "state": "absent"}

PLAY RECAP *********************************************************************
AIX73                      : ok=9    changed=5    unreachable=0    failed=0    skipped=2    rescued=0    ignored=0

Thursday 14 August 2025  22:53:44 -0400 (0:00:00.446)       0:00:21.034 *******
===============================================================================
aix_ifix : Apply iFix using emgr (if not already applied) -------------- 17.11s
aix_ifix : Transfer iFix file to AIX host ------------------------------- 1.27s
aix_ifix : Check if iFix is already applied ----------------------------- 0.70s
aix_ifix : Check available space in /(root) filesystem ------------------ 0.56s
aix_ifix : Create temporary directory for iFix file --------------------- 0.51s
aix_ifix : Remove temporary directory from remote host ------------------ 0.45s
aix_ifix : Remove iFix file from remote host ---------------------------- 0.34s
aix_ifix : Display message if iFix was applied successfully ------------- 0.01s
aix_ifix : Parse available space from df output ------------------------- 0.01s
aix_ifix : Fail if available space is less than the required minimum ---- 0.01s
aix_ifix : Display message if iFix was already applied ------------------ 0.01s

ifix 適用確認

shell モジュールを使用して、Ansible 実行サーバーからリモートのサーバーの ifix 適用状態を確認しています。

# ansible aix -m shell -a "emgr -l"
Using /work/ansible-test/ansible.cfg as config file
AIX73 | CHANGED | rc=0 >>

ID  STATE LABEL      INSTALL TIME      UPDATED BY ABSTRACT
=== ===== ========== ================= ========== ======================================
1   *Q*   IJ44749m1a 10/07/19 00:55:13            ifix for case TS011611179

STATE codes:
 S = STABLE
 M = MOUNTED
 U = UNMOUNTED
 Q = REBOOT REQUIRED
 B = BROKEN
 I = INSTALLING
 R = REMOVING
 T = TESTED
 P = PATCHED
 N = NOT PATCHED
 SP = STABLE + PATCHED
 SN = STABLE + NOT PATCHED
 QP = BOOT IMAGE MODIFIED + PATCHED
 QN = BOOT IMAGE MODIFIED + NOT PATCHED
 RQ = REMOVING + REBOOT REQUIRED

STATE Q のため、リブートが必要です。

HMC(Hardware Management Console) から OSリブートを実行します。
(実行ログは割愛します)


リブート後の確認

Ansible サーバーから対象サーバーに emgr コマンドを発行してifix適用状態を確認します。

# ansible aix -m shell -a "emgr -l"
Using /work/ansible-test/ansible.cfg as config file
AIX73 | CHANGED | rc=0 >>

ID  STATE LABEL      INSTALL TIME      UPDATED BY ABSTRACT
=== ===== ========== ================= ========== ======================================
1    S    IJ44749m1a 10/07/19 00:55:13            ifix for case TS011611179

STATE codes:
S = STABLE
M = MOUNTED
U = UNMOUNTED
Q = REBOOT REQUIRED
B = BROKEN
I = INSTALLING
R = REMOVING
T = TESTED
P = PATCHED
N = NOT PATCHED
SP = STABLE + PATCHED
SN = STABLE + NOT PATCHED
QP = BOOT IMAGE MODIFIED + PATCHED
QN = BOOT IMAGE MODIFIED + NOT PATCHED
RQ = REMOVING + REBOOT REQUIRED

リブート後は STABLE となりました。


おわりに

手作業で行っていたパッチ適用も、このように Ansible playbookを使えば、コマンド一つで安全かつ確実に行うことができます。

AIXの運用はまだまだ手作業が多い領域ですが、Ansibleのようなツールを積極的に活用することで、運用のあり方を大きく変えることが可能です。


参考

以下はサーバー上に配置、コマンド実行して ifix を適用した例です。

以上です。

2
0
5

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?