Ansible でオンプレミス IBM Power に複数台の仮想マシンをPowerVC 経由でデプロイするコード・サンプル

### はじめに

PowerVC経由での複数台の仮想マシン・デプロイを行う Ansible コードおよび実行例をご紹介します。


以前の記事の発展形です。

https://qiita.com/c_u/items/95daed5b6171cc79321d



PowerVC については以下をご参考ください

https://qiita.com/c_u/items/41e87f5d0e0417c74395


---

### オンプレミス環境

ハードウェア：IBM Power S1014
Storage: FS5015
SAN switch(IBM_8969_F24) : Fabric OS:  v9.0.1c
HMC(7063-CR2): V10R3.1050.0
VIOS: 3.1
PowerVC 2.3.0 (IBM Power上のLPAR, OS: RHEL 9.4 ppc64le)
Ansible PowerVC同梱のAnsibleを使用)　2.9.27


---

### Ansible実装方針


・ロールベース設計を採用し、powervc_authとdeploy_vmの2つのロールで構成しています。

・Jinja2テンプレートエンジンを活用して、NIC構成(ネットワークの数)の差異を複数のテンプレートを準備して選択しています。

---

### 使用する Ansible コード

PowerVC API と Ansibleの書き方を勉強しながら当方で作成したコードです。
必要でしたら自己責任の上でご自由に使用ください。

```
<Ansible Home Directory>
.
|-- ansible.cfg　　  　#<= Ansible構成ファイル
|
|-- inventory         #<= インベントリー
|   `-- powervc.yml
|
|-- group_vars       #<= 変数ディレクトリ
|   |
|   |-- all
|   |   `-- default_vars.yml　　　#<= 全ての実行で読み込まれる変数
|   |
|   |-- deploy_vm.yml　　　　　　　#<= 仮想マシン・デプロイ用の変数　　　　
|   `-- powervc_auth.yml　　　　　#<= PowerVC認証用の変数
|
|-- powervc_auth.yml　　　　　　　　#<= PowerVC認証ロール呼び出し playbook
|
|-- deploy_vm.yml                #<= 仮想マシン・デプロイ・ロール呼び出し playbook
|
`-- roles
    |-- powervc_auth            　#<= PowerVC認証ロール
    |   |-- tasks
    |   |   `-- main.yml　　　　　　#<= main処理
    |   |            
    |    `-- templates
    |        `-- body_auth_token.json.j2　　#<= PowerVC認証のテンプレート
    |   
    `-- deploy_vm　　　　　　　　　　#<= 仮想マシン・デプロイロール
        |-- tasks
        |   |-- main.yml          #<= main処理、ループ実行、子playbook呼び出し
        |   `-- deploy_vms.yml    #<= 仮想マシン・デプロイロール実行
        |       
        `-- templates
            |-- body_deploy_vm1.json.j2　　　#<=  NIC1つのデプロイ用テンプレート
            |-- body_deploy_vm2.json.j2　　　#<=  NIC2つのデプロイ用テンプレート
            |-- body_deploy_vm3.json.j2　　　#<=  NIC3つのデプロイ用テンプレート
            `-- body_deploy_vm4.json.j2　　　#<=  NIC4つのデプロイ用テンプレート
```



ディレクトリは以下の記事の構成を採用しています。

https://qiita.com/c_u/items/685d6651abf639c60201


<br>


---

#### ansible 構成ファイル

インベントリー・ディレクトリの指定やログ表示を指定しています。

<details><summary>ansible.cfg</summary>

```ansible.cfg
[defaults]
inventory = ./inventory/
deprecation_warnings=False
host_key_checking = False
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

[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'
```
</details>


---

#### インベントリー・ファイル

インベントリーの設定。"powervc" として、PowerVCサーバーを設定しています。

<details><summary>./inventory/powervc.yml</summary>

```inventory/powervc.yml
[powervc]
powervc230-test ansible_user=root
```

↑は /etc/hosts で名前解決できている前提です。
</details>




---


#### 変数ファイル

・デフォルトで読み込まれる変数

<details><summary>./group_vars/all/default_vars.yml</summary>

```group_vars/all/default_vars.yml

## default variables

ANSIBLE_HOME: /work/ansible/
TENANT_ID: "xxxxxxxxxxxxxxxxxxx"
SSH_KEY_PRI: /root/.ssh/id_rsa

```

</details>

<br>

・PowerVC 認証用変数

変数ファイルに直接パスワードを入力していますが、実際は Ansible vault で暗号化しています。(今回は暗号化方法は記載省略)

<details><summary>./group_vars/powervc_auth.yml</summary>

```
---
POWERVC_IP: xxx.xx.xxx.xx
POWERVC_USER: root
POWERVC_PASSWORD: xxxxxxxx
```
</details>
<br>

・仮想マシン・デプロイ用の変数 (2台分を指定) 
<details><summary>./group_vars/deploy_vm.yml</summary>

```group_vars/deploy_vm.yml
deploy_list:
  - SERVER_INDEX: 1
    VM_NAME: "testvm0222_u1"    #<= 仮想マシン名
    TARGET_HOST: "910541B_7xxxx1"　　　 #<= デプロイ・ターゲットの筐体
    IMAGE_ID: "xxxx-322d-xxxx-xxxx-38xxxxxxxe6"　　　　　　　　#<= イメージ ID
    IMAGE_DISK_SIZE: 100　　　　　　#<= イメージディスク・サイズ
    FLAVOR_ID: "xxxxxxx-6081-xxxx-xxxxx-988xxxxxxba"　　　　　　　#<= 計算テンプレート ID
    STORAGE_TEMPLATE_ID: "xxxxxxx-xxxxx-457a-9e11-9exxxxxa7af"　  #<= ストレージ・テンプレート ID
    SCG_ID: "c0xxxx25-xxxx-4463-xxxx-9xxxxx63bae9"  #<= ストレージ・接続グループ ID
    DEDICATED_PROC: "false"      #<= Proc を占有モードにするかどうか
    POWER_COMPATIBILITY: "POWER10"   #<= Powerモード
    ABAILABILITY_PRIORITY: 127　　   #<= Availability priority
    SRR_CAPABILITY: "true"         　 #<= Simplified Remote Restart
    DISABLE_MIGRATION: 0　　　　    　 #<= LPARの筐体移動を許可するかどうか
    SSH_KEY_NAME: "pvc_sshkey"　    #<= 仮想マシンに設定する ssh 鍵名
    NETWORK_ID_1: "ccxxxx9-3b80-xxx-bcf6-eaxda5"xxx　   #<= ネットワーク ID
    NETWORK_IP_ADDRESS_1: "172.16.110.92"
    NETWORK_ID_2:
    NETWORK_IP_ADDRESS_2:
    NETWORK_ID_3:
    NETWORK_IP_ADDRESS_3:
    NETWORK_ID_4:
    NETWORK_IP_ADDRESS_4:
  - SERVER_INDEX: 2
    VM_NAME: "testvm0222_u2"
    TARGET_HOST: "910541B_7xxxx1"
    IMAGE_ID: "xxxx-322d-xxxx-xxxx-38xxxxxxxe6"
    IMAGE_DISK_SIZE: 100
    FLAVOR_ID: "xxxxxxx-6081-xxxx-xxxxx-988xxxxxxba"
    STORAGE_TEMPLATE_ID: "xxxxxxx-xxxxx-457a-9e11-9exxxxxa7af"
    SCG_ID: "c0xxxx25-xxxx-4463-xxxx-9xxxxx63bae9"
    DEDICATED_PROC: "false"
    POWER_COMPATIBILITY: "POWER10"
    ABAILABILITY_PRIORITY: 127
    SRR_CAPABILITY: "true"
    DISABLE_MIGRATION: 0
    SSH_KEY_NAME: "pvc_sshkey"
    NETWORK_ID_1: "ccxxxx9-3b80-xxx-bcf6-eaxda5"xxx
    NETWORK_IP_ADDRESS_1: "172.16.110.93"
    NETWORK_ID_2: "ccxxxx9-3b80-xxx-bcf6-eaxda5"xxx
    NETWORK_IP_ADDRESS_2: "172.16.110.94"
    NETWORK_ID_3:
    NETWORK_IP_ADDRESS_3:
    NETWORK_ID_4:
    NETWORK_IP_ADDRESS_4:
```

</details>

---

#### 実行するplaybook (呼び出し元)

Ansible home directory 直下に配置した、ロールを呼び出しする playbookの設定です。

・PowerVC認証ロールを呼び出す playbook

<details><summary>powervc_auth.yml</summary>

```powervc_auth.yml
---
- name:  powervc_auth
  hosts: "{{ target_hosts | default(dummy) }}"
  gather_facts: yes

  roles:
    - role: powervc_auth
      tags:
        -  powervc_auth_tag

```

</details>

<br>

・PowerVCによる仮想マシン・デプロイを実行する playbook

<details><summary>deploy_vm.yml</summary>

```deploy_vm.yml
---
- name:  create_vms
  hosts: "{{ target_hosts | default(dummy) }}"
  gather_facts: no

  roles:
   - role: powervc_auth
     tags:
       -  powervc_auth_tag

   - role: deploy_vm
     tags:
       -  deploy_vm_tag
```

</details>

---


#### role1. PowerVC 認証


PowerVC 認証で token を発行の API を実行する playbookです。

https://www.ibm.com/docs/ja/powervc-cloud/2.3.0?topic=apis-authenticating-powervc


main.yml はロールのメイン処理です。

<details><summary>./roles/powervc_auth/tasks/main.yml</summary>

```roles/powervc_auth/tasks/main.yml
---

# PowerVC authentication
- name: Get auth token
  ansible.builtin.uri:
    url: "https://{{ POWERVC_IP }}:5000/v3/auth/tokens"
    method: POST
    headers:
      Accept: application/json
    body: "{{ lookup('template', 'body_auth_token.json.j2') }}"
    body_format: json
    return_content: yes
    status_code: 201
    validate_certs: false
  register: auth_token

# set OS_TOKEN
- name: Set Variable OS_TOKEN
  set_fact:
    OS_TOKEN: "{{ auth_token['x_subject_token'] }}"

- name: show os_token
  ansible.builtin.debug:
    var: OS_TOKEN
```


</details>


main.yml に呼び出されるテンプレート・ファイル。ユーザー、パスワードを変数にしています。

<details><summary>./roles/powervc_auth/templates/body_auth_token.json.j2</summary>

```roles/powervc_auth/templates/body_auth_token.json.j2
{
	"auth": {
		"scope": {
			"project": {
				"domain": {
					"name": "Default"
				},
				"name": "ibm-default"
			}
		},
		"identity": {
			"password": {
				"user": {
					"domain": {
						"name": "Default"
					},
					"password": "{{ POWERVC_PASSWORD }}",
					"name": "{{ POWERVC_USER }}"
				}
			},
			"methods": [
				"password"
			]
		}
	}
}
```

</details>


---

#### role2. PowerVC 仮想マシン・デプロイ

PowerVC 仮想マシン・デプロイの API を実行する playbookです。


API のオプションはPowerVCマニュアル、OpenStack マニュアルを参照します。

https://www.ibm.com/docs/ja/powervc-cloud/2.3.0?topic=apis-deploy-servers


https://docs.openstack.org/api-ref/compute/


https://www.ibm.com/docs/ja/powervc-cloud/2.3.0?topic=apis-flavors-extra-specs

<br>

main.yml はロールのメイン処理です。変数によるループを実行し、変数ファイルに複数台分記載がある形式に対応しています。



<details><summary>./roles/deploy_vm/tasks/main.yml</summary>


```roles/deploy_vm/tasks/main.yml

---
# create vms
- include_tasks: deploy_vms.yml
  loop: "{{ deploy_list }}"
  loop_control:
    loop_var: server

# 300 sleep  ( for cloud-init)
- name: "A little Pause after Deployment 300 seconds"
  pause:
     seconds: 300
```

</details>

<br>

main.yml に呼び出される仮想マシン・デプロイ処理です。main.ymlでループの記載を見えやすくするために、別のplaybookとしています。


<details><summary>./roles/deploy_vm/tasks/deploy_vms.yml</summary>

```roles/deploy_vm/tasks/deploy_vms.yml
---

# set TEMPLATE_DIR variable
- name: Set fact dir name
  set_fact:
     TEMPLATE_DIR: "{{ ANSIBLE_HOME }}roles/deploy_vm/templates"

# set deploy template
- name: Select deploy template 4
  shell: |
         cp -p {{ TEMPLATE_DIR }}/body_deploy_vm4.json.j2 {{ TEMPLATE_DIR }}/body_deploy_vm.json.j2
         echo "Set 4 networks template."
  when: server.NETWORK_ID_4 is not none and server.NETWORK_ID_5 is none

- name: Select deploy template 3
  shell: |
         cp -p {{ TEMPLATE_DIR }}/body_deploy_vm3.json.j2 {{ TEMPLATE_DIR }}/body_deploy_vm.json.j2
         echo "Set 3 networks template."
  when: server.NETWORK_ID_3 is not none and server.NETWORK_ID_4 is none

- name: Select deploy template 2
  shell: |
         cp -p {{ TEMPLATE_DIR }}/body_deploy_vm2.json.j2 {{ TEMPLATE_DIR }}/body_deploy_vm.json.j2
         echo "Set 2 networks template."
  when: server.NETWORK_ID_2 is not none and server.NETWORK_ID_3 is none

- name: Select deploy template 1
  shell: |
         cp -p {{ TEMPLATE_DIR }}/body_deploy_vm1.json.j2 {{ TEMPLATE_DIR }}/body_deploy_vm.json.j2
         echo "Set 1 network template."
  when: server.NETWORK_ID_1 is not none and server.NETWORK_ID_2 is none

# VM create
- name: Send Request for Server Deployment
  ansible.builtin.uri:
    url: 'https://{{ POWERVC_IP }}:8774/v2.1/{{ TENANT_ID }}/servers'
    method: POST
    headers:
       X-Auth-Token: "{{ OS_TOKEN }}"
       Accept: application/json
    body_format: json
    body: "{{ lookup('template', 'body_deploy_vm.json.j2' ) }}"
    return_content: yes
    status_code: 202
    validate_certs: no
    timeout: 300

# create inventory
- name: create static inventory
  shell: |
    mkdir -p "{{ ANSIBLE_HOME }}inventory/deployed_vm/"
    echo "[ {{ server.VM_NAME }} ]" > {{ ANSIBLE_HOME }}inventory/deployed_vm/inventory_{{ server.VM_NAME }}.yml
    echo "{{ server.NETWORK_IP_ADDRESS_1 }} ansible_user=root ansible_ssh_private_key_file={{ SSH_KEY_PRI }} ansible_python_interpreter=/usr/bin/python3"  >> {{ ANSIBLE_HOME }}inventory/deployed_vm/inventory_{{ server.VM_NAME }}.yml
    cat "{{ ANSIBLE_HOME }}/inventory/deployed_vm/inventory_{{ server.VM_NAME }}.yml"
  register: shell_output

# check inventory
- debug:
    var: shell_output.stdout_lines


# sleep 60 seconds
- name: "A little Pause while Deployment 60 seconds"
  pause:
    seconds: 60
```

</details>


<br>

NIC の数の違いでAPI処理に呼び出すテンプレート・ファイルを分けています。

body_deploy_vm1.json.j2 はNICが1つの場合のテンプレートです。

<details><summary>./roles/deploy_vm/templates/body_deploy_vm1.json.j2</summary>

```roles/deploy_vm/templates/body_deploy_vm1.json.j2
{
   "server": {
      "name": "{{ server.VM_NAME }}",
      "max_count": 1,
      "imageRef": "{{ server.IMAGE_ID }}",
      "block_device_mapping_v2": [
         {
            "boot_index": "0",
            "uuid": "{{ server.STORAGE_TEMPLATE_ID }}",
            "source_type": "image",
            "destination_type": "volume"
         }
      ],
      "config_drive": true,
      "key_name": "{{ server.SSH_KEY_NAME }}",
      "flavorRef": "{{ server.FLAVOR_ID }}",
      "networks": [
         {
            "uuid": "{{ server.NETWORK_ID_1 }}",
            "fixed_ip": "{{ server.NETWORK_IP_ADDRESS_1 }}"
         }
      ]
   },
    "OS-SCH-HNT:scheduler_hints": {
        "same_host": "{{ server.TARGET_HOST }}"
    }
}
```

</details>

<br>

body_deploy_vm2.json.j2 はNICが2つの場合のテンプレートです。

<details><summary>./roles/deploy_vm/templates/body_deploy_vm2.json.j2</summary>

```roles/deploy_vm/templates/body_deploy_vm2.json.j2
{
   "server": {
      "name": "{{ server.VM_NAME }}",
      "max_count": 1,
      "imageRef": "{{ server.IMAGE_ID }}",
      "block_device_mapping_v2": [
         {
            "boot_index": "0",
            "uuid": "{{ server.STORAGE_TEMPLATE_ID }}",
            "source_type": "image",
            "destination_type": "volume"
         }
      ],
      "config_drive": true,
      "key_name": "{{ server.SSH_KEY_NAME }}",
      "flavorRef": "{{ server.FLAVOR_ID }}",
      "networks": [
      {% for network_num in range(1, 3) %}
      {
        "uuid": "{{ server['NETWORK_ID_' ~ network_num] }}",
        "fixed_ip": "{{ server['NETWORK_IP_ADDRESS_' ~ network_num] }}"
      }
      {% if not loop.last %}
      ,
      {% endif %}
      {% endfor %}
      ]
   },
    "OS-SCH-HNT:scheduler_hints": {
        "same_host": "{{ server.TARGET_HOST }}"
    }
}
```

</details>

<br>

body_deploy_vm3.json.j2 はNICが3つの場合のテンプレートです。

<details><summary>./roles/deploy_vm/templates/body_deploy_vm3.json.j2</summary>

```/roles/deploy_vm/templates/body_deploy_vm3.json.j2
{
   "server": {
      "name": "{{ server.VM_NAME }}",
      "max_count": 1,
      "imageRef": "{{ server.IMAGE_ID }}",
      "block_device_mapping_v2": [
         {
            "boot_index": "0",
            "uuid": "{{ server.STORAGE_TEMPLATE_ID }}",
            "source_type": "image",
            "destination_type": "volume"
         }
      ],
      "config_drive": true,
      "key_name": "{{ server.SSH_KEY_NAME }}",
      "flavorRef": "{{ server.FLAVOR_ID }}",
      "networks": [
      {% for network_num in range(1, 4) %}
      {
        "uuid": "{{ server['NETWORK_ID_' ~ network_num] }}",
        "fixed_ip": "{{ server['NETWORK_IP_ADDRESS_' ~ network_num] }}"
      }
      {% if not loop.last %}
      ,
      {% endif %}
      {% endfor %}
      ]
   },
    "OS-SCH-HNT:scheduler_hints": {
        "same_host": "{{ server.TARGET_HOST }}"
    }
}
```


</details>


<br>

body_deploy_vm4.json.j2 はNICが4つの場合のテンプレートです。



<details><summary>./roles/deploy_vm/templates/body_deploy_vm4.json.j2</summary>

```roles/deploy_vm/templates/body_deploy_vm4.json.j2
{
   "server": {
      "name": "{{ server.VM_NAME }}",
      "max_count": 1,
      "imageRef": "{{ server.IMAGE_ID }}",
      "block_device_mapping_v2": [
         {
            "boot_index": "0",
            "uuid": "{{ server.STORAGE_TEMPLATE_ID }}",
            "source_type": "image",
            "destination_type": "volume"
         }
      ],
      "config_drive": true,
      "key_name": "{{ server.SSH_KEY_NAME }}",
      "flavorRef": "{{ server.FLAVOR_ID }}",
      "networks": [
      {% for network_num in range(1, 5) %}
      {
        "uuid": "{{ server['NETWORK_ID_' ~ network_num] }}",
        "fixed_ip": "{{ server['NETWORK_IP_ADDRESS_' ~ network_num] }}"
      }
      {% if not loop.last %}
      ,
      {% endif %}
      {% endfor %}
      ]
   },
    "OS-SCH-HNT:scheduler_hints": {
        "same_host": "{{ server.TARGET_HOST }}"
    }
}
```

</details>


---

### PowerVC で仮想マシン2台を作成する Ansible playbook を実行


実行するansible-playbookコマンドでは変数ファイルを2つ指定し、ターゲット・ホストを指定しています。


```
# ansible-playbook deploy_vm.yml -e "@./group_vars/powervc_auth.yml" -e "@./group_vars/deploy_vm.yml" -e "target_hosts=powervc"
```

<br>

<details><summary>実行ログ</summary>

```
# ansible-playbook deploy_vm.yml -e "@./group_vars/powervc_auth.yml" -e "@./group_vars/deploy_vm.yml" -e "target_hosts=powervc"
Using /work/ansible/ansible.cfg as config file

PLAY [create_vms] ************************************************************************************************************************************************************************
Friday 21 February 2025  17:03:42 +0900 (0:00:00.042)       0:00:00.042 *******

TASK [powervc_auth : Get auth token] *****************************************************************************************************************************************************
ok: [powervc230-test] => {"changed": false, "connection": "Upgrade, close", "content": "{\"token\": {\"methods\": [\"password\"], \"user\": {\"domain\": {\"id\": \"default\", \"name\": \"Default\"}, \"id\": \"37d1714693f64fbba9140d4260ba8204\", \"name\": \"root\", \"password_expires_at\": null}, \"audit_ids\": [\"yaYQFfG1Qqek5DdGvJvdhg\"], \"expires_at\": \"2025-02-21T14:03:43.000000Z\", \"issued_at\": \"2025-02-21T08:03:43.000000Z\", \"project\": {\"domain\": {\"id\": \"default\", \"name\": \"Default\"}, \"id\": \"xxxxxxxxxxxxxxxxxxx\", \"name\": \"ibm-default\"}, \"is_domain\": false, \"roles\": [{\"id\": \"b2b7c61e372b4d4ab73c9acf8dce2aa1\", \"name\": \"admin\"}], \"is_admin_project\": true, \"catalog\": [{\"endpoints\": [{\"id\": \"3a05762da2574d23a066977d8e936851\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9292\", \"region\": \"RegionOne\"}, {\"id\": \"6a42c71d00a04b1f996dc35c49178a95\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9292\", \"region\": \"RegionOne\"}, {\"id\": \"77f3fcef0c0e4830b06d4770f6698816\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9292\", \"region\": \"RegionOne\"}], \"id\": \"00a63e1288a741679d7ff875e541d727\", \"type\": \"image\", \"name\": \"glance\"}, {\"endpoints\": [{\"id\": \"06b6d480bfae4d0f9bc633b66098dee8\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:5000\", \"region\": \"RegionOne\"}, {\"id\": \"baa0d7b6337a45428c428d13ae3eb3c6\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:5000\", \"region\": \"RegionOne\"}, {\"id\": \"ca2e00f31e7b4d5095cf48817571f4cf\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:5000\", \"region\": \"RegionOne\"}], \"id\": \"0ea36c3b4dd344af9aaa1bd7acf1d9cd\", \"type\": \"identity\", \"name\": \"keystone\"}, {\"endpoints\": [{\"id\": \"01df412587ef40ed88c2d035c49322fc\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8080/v1/AUTH_xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"76e5c658e8b74f12a1858e551a2444d7\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8080/v1/AUTH_xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"8e6afdf092874f63aaa3b77d48042010\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8080/v1/AUTH_xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}], \"id\": \"136d2b1de47b443e860aee255d11c2d5\", \"type\": \"object-store\", \"name\": \"swift\"}, {\"endpoints\": [{\"id\": \"bb47c98b4b6a41fb96650782e9e01c3b\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"e3349775f68f407eb0aa584e6e396841\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"fee797dedbdd40b0afd82bf4324811e8\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}], \"id\": \"20460f810c024ca9bab58aed32f8ad4e\", \"type\": \"volumev3\", \"name\": \"cinderv3\"}, {\"endpoints\": [{\"id\": \"37cc0debe91443d9b2272522f62af0c9\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"3d66143f77be41e0aeab84a1afff3ba3\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"caa36ea0d46d4caa9b097305aa25b9da\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}], \"id\": \"3626f36e2c574d448dc19086a7b9c727\", \"type\": \"compute\", \"name\": \"nova\"}, {\"endpoints\": [{\"id\": \"41a7e3805ea94d43b64869be9dd928e0\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v2/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"be96ae88f1434d6495c7819960f5b1ae\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v2/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"e31f2e5a3e744496be8193cfbddc7ec4\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v2/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}], \"id\": \"4a6eac84b4114b0fbe2f5968774c0407\", \"type\": \"volumev2\", \"name\": \"cinderv2\"}, {\"endpoints\": [{\"id\": \"77d695e3e5c7484a9ff0ec4c57b7d191\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8778\", \"region\": \"RegionOne\"}, {\"id\": \"924c819cb0e14fa28cc2eeaf97af6148\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8778\", \"region\": \"RegionOne\"}, {\"id\": \"b14a08e8dae4414b82f35c6a27730772\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8778\", \"region\": \"RegionOne\"}], \"id\": \"54e06949a8534c63a6b893c4f4df03bd\", \"type\": \"event\", \"name\": \"panko\"}, {\"endpoints\": [{\"id\": \"5db53c154f134243ac08ac96f8cf699b\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8780\", \"region\": \"RegionOne\"}, {\"id\": \"acf2bb58076f44a0aedb274bbf4ab8de\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8780\", \"region\": \"RegionOne\"}, {\"id\": \"cc55c6eed15144b1a476e334b5d0a5e4\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8780\", \"region\": \"RegionOne\"}], \"id\": \"633c55b0710c425195b50d85f3d1d23f\", \"type\": \"placement\", \"name\": \"placement\"}, {\"endpoints\": [{\"id\": \"09048171a002491b8df7c0fce57ab20b\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9696\", \"region\": \"RegionOne\"}, {\"id\": \"42a176e1e88a4603b610ebc6b944ec41\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9696\", \"region\": \"RegionOne\"}, {\"id\": \"c79b10980bbc47ba99a97776028e2404\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9696\", \"region\": \"RegionOne\"}], \"id\": \"651cc81d5cf848e38870db539a8d809b\", \"type\": \"network\", \"name\": \"neutron\"}, {\"endpoints\": [{\"id\": \"02b163ee95624a8c9d84377e8b398af7\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8428\", \"region\": \"RegionOne\"}, {\"id\": \"17be952442af4905b93dd62ebedbdad9\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8428\", \"region\": \"RegionOne\"}, {\"id\": \"6b9d467c4f494ae082ffd8457eabdfff\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8428\", \"region\": \"RegionOne\"}], \"id\": \"7941e7a619d24343b5a86b4842bef4b2\", \"type\": \"ttv\", \"name\": \"ttv-validation\"}, {\"endpoints\": [{\"id\": \"1096caa871904126b8fdcdbbf97ba69d\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"733793f5a86a43bf94a3aea991a3c10e\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}, {\"id\": \"8d1639e697a64cbcad90bb0a741a7576\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx\", \"region\": \"RegionOne\"}], \"id\": \"8da7682c2fb3438b9b1a374116002934\", \"type\": \"volume\", \"name\": \"cinder\"}, {\"endpoints\": [{\"id\": \"795fc8b4ebae488ba38969586da71e90\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8998\", \"region\": \"RegionOne\"}, {\"id\": \"89898094b2c349e6aa335b7fe058f158\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8998\", \"region\": \"RegionOne\"}, {\"id\": \"94e5c6c5a2004b19820400b63056ea01\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8998\", \"region\": \"RegionOne\"}], \"id\": \"907f88fd61c7463d8c2a6eaaee19565d\", \"type\": \"self-service\", \"name\": \"clerk\"}, {\"endpoints\": [{\"id\": \"250af0905fc8484e9b2fefb8b756c687\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9450\", \"region\": \"RegionOne\"}, {\"id\": \"7c4f50c00f9b48e1a68a7316ab567733\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9450\", \"region\": \"RegionOne\"}, {\"id\": \"a96e8ab14c134f28a21f69abe9c8f56c\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:9450\", \"region\": \"RegionOne\"}], \"id\": \"9a75cd1b58ca4a3481579697faac3018\", \"type\": \"resource-reservation\", \"name\": \"blazar\"}, {\"endpoints\": [{\"id\": \"8b3d968374a94bb8a85b134c08492030\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8041\", \"region\": \"RegionOne\"}, {\"id\": \"f03099c6838943f7b27118e173203197\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8041\", \"region\": \"RegionOne\"}, {\"id\": \"f3c46b370cf546d280f8e870d3241170\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:8041\", \"region\": \"RegionOne\"}], \"id\": \"a7e67dd6103447b980bf9321f6a3c688\", \"type\": \"metric\", \"name\": \"gnocchi\"}, {\"endpoints\": [{\"id\": \"526528205b384945a2d6214ea50fcfde\", \"interface\": \"admin\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:5470\", \"region\": \"RegionOne\"}, {\"id\": \"8f293db224f446ada2504b56398bd7a2\", \"interface\": \"internal\", \"region_id\": \"RegionOne\", \"url\": \"http://localhost:5470\", \"region\": \"RegionOne\"}, {\"id\": \"dc63616fe04c45539656f07922513136\", \"interface\": \"public\", \"region_id\": \"RegionOne\", \"url\": \"https://<PowerVC_VIP>:5470\", \"region\": \"RegionOne\"}], \"id\": \"d2c31e099aae42cfa37fe2f75f2148cb\", \"type\": \"notification\", \"name\": \"bumblebee\"}]}}", "content_length": "9504", "content_type": "application/json", "cookies": {}, "cookies_string": "", "date": "Fri, 21 Feb 2025 08:03:43 GMT", "elapsed": 0, "json": {"token": {"audit_ids": ["yaYQFfG1Qqek5DdGvJvdhg"], "catalog": [{"endpoints": [{"id": "3a05762da2574d23a066977d8e936851", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9292"}, {"id": "6a42c71d00a04b1f996dc35c49178a95", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9292"}, {"id": "77f3fcef0c0e4830b06d4770f6698816", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9292"}], "id": "00a63e1288a741679d7ff875e541d727", "name": "glance", "type": "image"}, {"endpoints": [{"id": "06b6d480bfae4d0f9bc633b66098dee8", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:5000"}, {"id": "baa0d7b6337a45428c428d13ae3eb3c6", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:5000"}, {"id": "ca2e00f31e7b4d5095cf48817571f4cf", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:5000"}], "id": "0ea36c3b4dd344af9aaa1bd7acf1d9cd", "name": "keystone", "type": "identity"}, {"endpoints": [{"id": "01df412587ef40ed88c2d035c49322fc", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8080/v1/AUTH_xxxxxxxxxxxxxxxxxxx"}, {"id": "76e5c658e8b74f12a1858e551a2444d7", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8080/v1/AUTH_xxxxxxxxxxxxxxxxxxx"}, {"id": "8e6afdf092874f63aaa3b77d48042010", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8080/v1/AUTH_xxxxxxxxxxxxxxxxxxx"}], "id": "136d2b1de47b443e860aee255d11c2d5", "name": "swift", "type": "object-store"}, {"endpoints": [{"id": "bb47c98b4b6a41fb96650782e9e01c3b", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx"}, {"id": "e3349775f68f407eb0aa584e6e396841", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx"}, {"id": "fee797dedbdd40b0afd82bf4324811e8", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx"}], "id": "20460f810c024ca9bab58aed32f8ad4e", "name": "cinderv3", "type": "volumev3"}, {"endpoints": [{"id": "37cc0debe91443d9b2272522f62af0c9", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx"}, {"id": "3d66143f77be41e0aeab84a1afff3ba3", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx"}, {"id": "caa36ea0d46d4caa9b097305aa25b9da", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx"}], "id": "3626f36e2c574d448dc19086a7b9c727", "name": "nova", "type": "compute"}, {"endpoints": [{"id": "41a7e3805ea94d43b64869be9dd928e0", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v2/xxxxxxxxxxxxxxxxxxx"}, {"id": "be96ae88f1434d6495c7819960f5b1ae", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v2/xxxxxxxxxxxxxxxxxxx"}, {"id": "e31f2e5a3e744496be8193cfbddc7ec4", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v2/xxxxxxxxxxxxxxxxxxx"}], "id": "4a6eac84b4114b0fbe2f5968774c0407", "name": "cinderv2", "type": "volumev2"}, {"endpoints": [{"id": "77d695e3e5c7484a9ff0ec4c57b7d191", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8778"}, {"id": "924c819cb0e14fa28cc2eeaf97af6148", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8778"}, {"id": "b14a08e8dae4414b82f35c6a27730772", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8778"}], "id": "54e06949a8534c63a6b893c4f4df03bd", "name": "panko", "type": "event"}, {"endpoints": [{"id": "5db53c154f134243ac08ac96f8cf699b", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8780"}, {"id": "acf2bb58076f44a0aedb274bbf4ab8de", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8780"}, {"id": "cc55c6eed15144b1a476e334b5d0a5e4", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8780"}], "id": "633c55b0710c425195b50d85f3d1d23f", "name": "placement", "type": "placement"}, {"endpoints": [{"id": "09048171a002491b8df7c0fce57ab20b", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9696"}, {"id": "42a176e1e88a4603b610ebc6b944ec41", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9696"}, {"id": "c79b10980bbc47ba99a97776028e2404", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9696"}], "id": "651cc81d5cf848e38870db539a8d809b", "name": "neutron", "type": "network"}, {"endpoints": [{"id": "02b163ee95624a8c9d84377e8b398af7", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8428"}, {"id": "17be952442af4905b93dd62ebedbdad9", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8428"}, {"id": "6b9d467c4f494ae082ffd8457eabdfff", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8428"}], "id": "7941e7a619d24343b5a86b4842bef4b2", "name": "ttv-validation", "type": "ttv"}, {"endpoints": [{"id": "1096caa871904126b8fdcdbbf97ba69d", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx"}, {"id": "733793f5a86a43bf94a3aea991a3c10e", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx"}, {"id": "8d1639e697a64cbcad90bb0a741a7576", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9000/v3/xxxxxxxxxxxxxxxxxxx"}], "id": "8da7682c2fb3438b9b1a374116002934", "name": "cinder", "type": "volume"}, {"endpoints": [{"id": "795fc8b4ebae488ba38969586da71e90", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8998"}, {"id": "89898094b2c349e6aa335b7fe058f158", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8998"}, {"id": "94e5c6c5a2004b19820400b63056ea01", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8998"}], "id": "907f88fd61c7463d8c2a6eaaee19565d", "name": "clerk", "type": "self-service"}, {"endpoints": [{"id": "250af0905fc8484e9b2fefb8b756c687", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9450"}, {"id": "7c4f50c00f9b48e1a68a7316ab567733", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9450"}, {"id": "a96e8ab14c134f28a21f69abe9c8f56c", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:9450"}], "id": "9a75cd1b58ca4a3481579697faac3018", "name": "blazar", "type": "resource-reservation"}, {"endpoints": [{"id": "8b3d968374a94bb8a85b134c08492030", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8041"}, {"id": "f03099c6838943f7b27118e173203197", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8041"}, {"id": "f3c46b370cf546d280f8e870d3241170", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:8041"}], "id": "a7e67dd6103447b980bf9321f6a3c688", "name": "gnocchi", "type": "metric"}, {"endpoints": [{"id": "526528205b384945a2d6214ea50fcfde", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:5470"}, {"id": "8f293db224f446ada2504b56398bd7a2", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "url": "http://localhost:5470"}, {"id": "dc63616fe04c45539656f07922513136", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "url": "https://<PowerVC_VIP>:5470"}], "id": "d2c31e099aae42cfa37fe2f75f2148cb", "name": "bumblebee", "type": "notification"}], "expires_at": "2025-02-21T14:03:43.000000Z", "is_admin_project": true, "is_domain": false, "issued_at": "2025-02-21T08:03:43.000000Z", "methods": ["password"], "project": {"domain": {"id": "default", "name": "Default"}, "id": "xxxxxxxxxxxxxxxxxxx", "name": "ibm-default"}, "roles": [{"id": "b2b7c61e372b4d4ab73c9acf8dce2aa1", "name": "admin"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "37d1714693f64fbba9140d4260ba8204", "name": "root", "password_expires_at": null}}}, "msg": "OK (9504 bytes)", "redirected": false, "server": "Apache", "status": 201, "upgrade": "h2", "url": "https://<PowerVC_VIP>:5000/v3/auth/tokens", "vary": "X-Auth-Token,User-Agent", "x_openstack_request_id": "req-7b215651-6fd6-41e8-8ac7-cedb8742f991", "x_subject_token": "gAAAAABnuDNfWms_g0osbyjdJIAMoEubkUue3dO1tzO6kWh83ZHyPJpYw13MbC5xemfGVLEAPOsnjTPqtmh48zvLs00PTaWsOLQmUaQ099KBSS13ph2aibNYWcXmzleiFw7VZpbmXsEGoyEUf_NXHpUJGmfq3_trgkWEN_PEPFsi6goVUq5bRXE"}
Friday 21 February 2025  17:03:43 +0900 (0:00:01.204)       0:00:01.247 *******

TASK [powervc_auth : Set Variable OS_TOKEN] **********************************************************************************************************************************************
ok: [powervc230-test] => {"ansible_facts": {"OS_TOKEN": "gAAAAABnuDNfWms_g0osbyjdJIAMoEubkUue3dO1tzO6kWh83ZHyPJpYw13MbC5xemfGVLEAPOsnjTPqtmh48zvLs00PTaWsOLQmUaQ099KBSS13ph2aibNYWcXmzleiFw7VZpbmXsEGoyEUf_NXHpUJGmfq3_trgkWEN_PEPFsi6goVUq5bRXE"}, "changed": false}
Friday 21 February 2025  17:03:43 +0900 (0:00:00.010)       0:00:01.257 *******

TASK [powervc_auth : show os_token] ******************************************************************************************************************************************************
ok: [powervc230-test] => {
    "OS_TOKEN": "gAAAAABnuDNfWms_g0osbyjdJIAMoEubkUue3dO1tzO6kWh83ZHyPJpYw13MbC5xemfGVLEAPOsnjTPqtmh48zvLs00PTaWsOLQmUaQ099KBSS13ph2aibNYWcXmzleiFw7VZpbmXsEGoyEUf_NXHpUJGmfq3_trgkWEN_PEPFsi6goVUq5bRXE"
}
Friday 21 February 2025  17:03:43 +0900 (0:00:00.010)       0:00:01.267 *******
included: /work/ansible/roles/deploy_vm/tasks/deploy_vms.yml for powervc230-test
included: /work/ansible/roles/deploy_vm/tasks/deploy_vms.yml for powervc230-test
Friday 21 February 2025  17:03:43 +0900 (0:00:00.023)       0:00:01.291 *******

TASK [deploy_vm : Set fact dir name] *****************************************************************************************************************************************************
ok: [powervc230-test] => {"ansible_facts": {"TEMPLATE_DIR": "/work/ansible/roles/deploy_vm/templates"}, "changed": false}
Friday 21 February 2025  17:03:43 +0900 (0:00:00.010)       0:00:01.301 *******
Friday 21 February 2025  17:03:43 +0900 (0:00:00.008)       0:00:01.310 *******
Friday 21 February 2025  17:03:43 +0900 (0:00:00.010)       0:00:01.320 *******
Friday 21 February 2025  17:03:43 +0900 (0:00:00.008)       0:00:01.329 *******

TASK [deploy_vm : Select deploy template 1] **********************************************************************************************************************************************
changed: [powervc230-test] => {"changed": true, "cmd": "cp -p /work/ansible/roles/deploy_vm/templates/body_deploy_vm1.json.j2 /work/ansible/roles/deploy_vm/templates/body_deploy_vm.json.j2\necho \"Set 1 network template.\"\n", "delta": "0:00:00.002522", "end": "2025-02-21 17:03:43.922104", "rc": 0, "start": "2025-02-21 17:03:43.919582", "stderr": "", "stderr_lines": [], "stdout": "Set 1 network template.", "stdout_lines": ["Set 1 network template."]}
Friday 21 February 2025  17:03:43 +0900 (0:00:00.381)       0:00:01.710 *******

TASK [deploy_vm : Send Request for Server Deployment] ************************************************************************************************************************************
ok: [powervc230-test] => {"changed": false, "connection": "close", "content": "{\"server\": {\"id\": \"3c1bea07-0d8f-4d12-8662-4266c679eb33\", \"links\": [{\"rel\": \"self\", \"href\": \"https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx/servers/3c1bea07-0d8f-4d12-8662-4266c679eb33\"}, {\"rel\": \"bookmark\", \"href\": \"https://<PowerVC_VIP>:8774/xxxxxxxxxxxxxxxxxxx/servers/3c1bea07-0d8f-4d12-8662-4266c679eb33\"}], \"OS-DCF:diskConfig\": \"MANUAL\", \"security_groups\": [{\"name\": \"default\"}]}}", "content_length": "417", "content_type": "application/json", "cookies": {}, "cookies_string": "", "date": "Fri, 21 Feb 2025 08:03:44 GMT", "elapsed": 0, "json": {"server": {"OS-DCF:diskConfig": "MANUAL", "id": "3c1bea07-0d8f-4d12-8662-4266c679eb33", "links": [{"href": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx/servers/3c1bea07-0d8f-4d12-8662-4266c679eb33", "rel": "self"}, {"href": "https://<PowerVC_VIP>:8774/xxxxxxxxxxxxxxxxxxx/servers/3c1bea07-0d8f-4d12-8662-4266c679eb33", "rel": "bookmark"}], "security_groups": [{"name": "default"}]}}, "location": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx/servers/3c1bea07-0d8f-4d12-8662-4266c679eb33", "msg": "OK (417 bytes)", "openstack_api_version": "compute 2.1", "redirected": false, "server": "Apache", "status": 202, "url": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx/servers", "vary": "OpenStack-API-Version,User-Agent,X-OpenStack-Nova-API-Version", "x_compute_request_id": "req-a9414f2d-2f56-4541-8bc1-7c23fecf9678", "x_openstack_nova_api_version": "2.1", "x_openstack_request_id": "req-a9414f2d-2f56-4541-8bc1-7c23fecf9678"}
Friday 21 February 2025  17:03:44 +0900 (0:00:00.805)       0:00:02.516 *******

TASK [deploy_vm : create static inventory] ***********************************************************************************************************************************************
[WARNING]: Consider using the file module with state=directory rather than running 'mkdir'.  If you need to use command because file is insufficient you can add 'warn: false' to this
command task or set 'command_warnings=False' in ansible.cfg to get rid of this message.
changed: [powervc230-test] => {"changed": true, "cmd": "mkdir -p \"/work/ansible/inventory/deployed_vm/\"\necho \"[ testvm0221_u1 ]\" > /work/ansible/inventory/deployed_vm/inventory_testvm0221_u1.yml\necho \"172.16.110.92 ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3\"  >> /work/ansible/inventory/deployed_vm/inventory_testvm0221_u1.yml\ncat \"/work/ansible//inventory/deployed_vm/inventory_testvm0221_u1.yml\"\n", "delta": "0:00:00.003257", "end": "2025-02-21 17:03:45.087977", "rc": 0, "start": "2025-02-21 17:03:45.084720", "stderr": "", "stderr_lines": [], "stdout": "[ testvm0221_u1 ]\n172.16.110.92 ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3", "stdout_lines": ["[ testvm0221_u1 ]", "172.16.110.92 ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3"]}
Friday 21 February 2025  17:03:45 +0900 (0:00:00.369)       0:00:02.885 *******

TASK [deploy_vm : debug] *****************************************************************************************************************************************************************
ok: [powervc230-test] => {
    "shell_output.stdout_lines": [
        "[ testvm0221_u1 ]",
        "172.16.110.92 ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3"
    ]
}
Friday 21 February 2025  17:03:45 +0900 (0:00:00.013)       0:00:02.899 *******
Pausing for 60 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)

TASK [deploy_vm : A little Pause while Deployment 60 seconds] ****************************************************************************************************************************
ok: [powervc230-test] => {"changed": false, "delta": 60, "echo": true, "rc": 0, "start": "2025-02-21 17:03:45.154941", "stderr": "", "stdout": "Paused for 60.0 seconds", "stop": "2025-02-21 17:04:45.155299", "user_input": ""}
Friday 21 February 2025  17:04:45 +0900 (0:01:00.010)       0:01:02.910 *******

TASK [deploy_vm : Set fact dir name] *****************************************************************************************************************************************************
ok: [powervc230-test] => {"ansible_facts": {"TEMPLATE_DIR": "/work/ansible/roles/deploy_vm/templates"}, "changed": false}
Friday 21 February 2025  17:04:45 +0900 (0:00:00.009)       0:01:02.920 *******
Friday 21 February 2025  17:04:45 +0900 (0:00:00.009)       0:01:02.930 *******
Friday 21 February 2025  17:04:45 +0900 (0:00:00.009)       0:01:02.939 *******

TASK [deploy_vm : Select deploy template 2] **********************************************************************************************************************************************
changed: [powervc230-test] => {"changed": true, "cmd": "cp -p /work/ansible/roles/deploy_vm/templates/body_deploy_vm2.json.j2 /work/ansible/roles/deploy_vm/templates/body_deploy_vm.json.j2\necho \"Set 2 networks template.\"\n", "delta": "0:00:00.002664", "end": "2025-02-21 17:04:45.671345", "rc": 0, "start": "2025-02-21 17:04:45.668681", "stderr": "", "stderr_lines": [], "stdout": "Set 2 networks template.", "stdout_lines": ["Set 2 networks template."]}
Friday 21 February 2025  17:04:45 +0900 (0:00:00.520)       0:01:03.459 *******
Friday 21 February 2025  17:04:45 +0900 (0:00:00.009)       0:01:03.469 *******

TASK [deploy_vm : Send Request for Server Deployment] ************************************************************************************************************************************
ok: [powervc230-test] => {"changed": false, "connection": "close", "content": "{\"server\": {\"id\": \"5aa8a5bd-a5cb-4f16-9759-07c803736dd4\", \"links\": [{\"rel\": \"self\", \"href\": \"https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx/servers/5aa8a5bd-a5cb-4f16-9759-07c803736dd4\"}, {\"rel\": \"bookmark\", \"href\": \"https://<PowerVC_VIP>:8774/xxxxxxxxxxxxxxxxxxx/servers/5aa8a5bd-a5cb-4f16-9759-07c803736dd4\"}], \"OS-DCF:diskConfig\": \"MANUAL\", \"security_groups\": [{\"name\": \"default\"}]}}", "content_length": "417", "content_type": "application/json", "cookies": {}, "cookies_string": "", "date": "Fri, 21 Feb 2025 08:04:46 GMT", "elapsed": 0, "json": {"server": {"OS-DCF:diskConfig": "MANUAL", "id": "5aa8a5bd-a5cb-4f16-9759-07c803736dd4", "links": [{"href": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx/servers/5aa8a5bd-a5cb-4f16-9759-07c803736dd4", "rel": "self"}, {"href": "https://<PowerVC_VIP>:8774/xxxxxxxxxxxxxxxxxxx/servers/5aa8a5bd-a5cb-4f16-9759-07c803736dd4", "rel": "bookmark"}], "security_groups": [{"name": "default"}]}}, "location": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx/servers/5aa8a5bd-a5cb-4f16-9759-07c803736dd4", "msg": "OK (417 bytes)", "openstack_api_version": "compute 2.1", "redirected": false, "server": "Apache", "status": 202, "url": "https://<PowerVC_VIP>:8774/v2.1/xxxxxxxxxxxxxxxxxxx/servers", "vary": "OpenStack-API-Version,User-Agent,X-OpenStack-Nova-API-Version", "x_compute_request_id": "req-4cef2bd9-7f0e-45e0-802b-aedb5bbba069", "x_openstack_nova_api_version": "2.1", "x_openstack_request_id": "req-4cef2bd9-7f0e-45e0-802b-aedb5bbba069"}
Friday 21 February 2025  17:04:46 +0900 (0:00:00.813)       0:01:04.282 *******

TASK [deploy_vm : create static inventory] ***********************************************************************************************************************************************
changed: [powervc230-test] => {"changed": true, "cmd": "mkdir -p \"/work/ansible/inventory/deployed_vm/\"\necho \"[ testvm0221_u2 ]\" > /work/ansible/inventory/deployed_vm/inventory_testvm0221_u2.yml\necho \"172.16.110.93 ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3\"  >> /work/ansible/inventory/deployed_vm/inventory_testvm0221_u2.yml\ncat \"/work/ansible//inventory/deployed_vm/inventory_testvm0221_u2.yml\"\n", "delta": "0:00:00.002840", "end": "2025-02-21 17:04:46.860705", "rc": 0, "start": "2025-02-21 17:04:46.857865", "stderr": "", "stderr_lines": [], "stdout": "[ testvm0221_u2 ]\n172.16.110.93 ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3", "stdout_lines": ["[ testvm0221_u2 ]", "172.16.110.93 ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3"]}
Friday 21 February 2025  17:04:46 +0900 (0:00:00.374)       0:01:04.656 *******

TASK [deploy_vm : debug] *****************************************************************************************************************************************************************
ok: [powervc230-test] => {
    "shell_output.stdout_lines": [
        "[ testvm0221_u2 ]",
        "172.16.110.93 ansible_user=root ansible_ssh_private_key_file=/root/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3"
    ]
}
Friday 21 February 2025  17:04:46 +0900 (0:00:00.012)       0:01:04.669 *******
Pausing for 60 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)

TASK [deploy_vm : A little Pause while Deployment 60 seconds] ****************************************************************************************************************************
ok: [powervc230-test] => {"changed": false, "delta": 60, "echo": true, "rc": 0, "start": "2025-02-21 17:04:46.924504", "stderr": "", "stdout": "Paused for 60.0 seconds", "stop": "2025-02-21 17:05:46.924813", "user_input": ""}
Friday 21 February 2025  17:05:46 +0900 (0:01:00.009)       0:02:04.678 *******
Pausing for 300 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)

TASK [deploy_vm : A little Pause after Deployment 300 seconds] ***************************************************************************************************************************
ok: [powervc230-test] => {"changed": false, "delta": 300, "echo": true, "rc": 0, "start": "2025-02-21 17:05:46.934071", "stderr": "", "stdout": "Paused for 300.0 seconds", "stop": "2025-02-21 17:10:46.934578", "user_input": ""}

PLAY RECAP *******************************************************************************************************************************************************************************
powervc230-test            : ok=18   changed=4    unreachable=0    failed=0    skipped=6    rescued=0    ignored=0

Friday 21 February 2025  17:10:46 +0900 (0:05:00.010)       0:07:04.689 *******
===============================================================================
deploy_vm : A little Pause after Deployment 300 seconds ------------------------------------------------------------------------------------------------------------------------- 300.01s
deploy_vm : A little Pause while Deployment 60 seconds --------------------------------------------------------------------------------------------------------------------------- 60.01s
deploy_vm : A little Pause while Deployment 60 seconds --------------------------------------------------------------------------------------------------------------------------- 60.01s
powervc_auth : Get auth token ----------------------------------------------------------------------------------------------------------------------------------------------------- 1.20s
deploy_vm : Send Request for Server Deployment ------------------------------------------------------------------------------------------------------------------------------------ 0.81s
deploy_vm : Send Request for Server Deployment ------------------------------------------------------------------------------------------------------------------------------------ 0.81s
deploy_vm : Select deploy template 2 ---------------------------------------------------------------------------------------------------------------------------------------------- 0.52s
deploy_vm : Select deploy template 1 ---------------------------------------------------------------------------------------------------------------------------------------------- 0.38s
deploy_vm : create static inventory ----------------------------------------------------------------------------------------------------------------------------------------------- 0.37s
deploy_vm : create static inventory ----------------------------------------------------------------------------------------------------------------------------------------------- 0.37s
deploy_vm : include_tasks --------------------------------------------------------------------------------------------------------------------------------------------------------- 0.02s
deploy_vm : debug ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.01s
deploy_vm : debug ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.01s
deploy_vm : Set fact dir name ----------------------------------------------------------------------------------------------------------------------------------------------------- 0.01s
powervc_auth : Set Variable OS_TOKEN ---------------------------------------------------------------------------------------------------------------------------------------------- 0.01s
powervc_auth : show os_token ------------------------------------------------------------------------------------------------------------------------------------------------------ 0.01s
deploy_vm : Select deploy template 3 ---------------------------------------------------------------------------------------------------------------------------------------------- 0.01s
deploy_vm : Select deploy template 4 ---------------------------------------------------------------------------------------------------------------------------------------------- 0.01s
deploy_vm : Set fact dir name ----------------------------------------------------------------------------------------------------------------------------------------------------- 0.01s
deploy_vm : Select deploy template 1 ---------------------------------------------------------------------------------------------------------------------------------------------- 0.01s
#
```

</details>

<br>

* PowerVC GUI で仮想マシンが2台作成されていることを確認できました。IPアドレスも指定通りに付与されていることが確認できます。

<br>

![図1.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/517421/ae9d4986-5058-45ce-93d4-c30cd78149e0.png)



---

### おわりに

上記のコードは PowerVC バージョン 2.1, 2.2 でも稼働します。
OpenStack plugin などは使用せず、ansible.builtin.uriでのAPI の詳細を直接指定する方式なので、バージョン変更による影響は受けにくい汎用的なコードとなっていると思います


以上です。