0
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?

AAP定義のダンプ、適用

Posted at

AAP定義のダンプ、適用

操作 コマンド 生成/入力フォーマット
ダンプ(エクスポート) awx export … Controller API 互換の 1 つの JSON
適用(インポート) awx import < file.json awx export が出した JSON そのまま

インポート時、--preserve_policyにより、all(保持)、none(削除して追加)、on_collision(名前が衝突する場合には保持)を指定可能。デフォルトではall。

全設定をフルバックアップ

awx export > full_backup_$(date +%F).json

組織・インベントリー・プロジェクト・Credential・Job Template など主要リソースをすべて含む。
Credential の秘密 (password/token/ssh-key) は "$encrypted$" でマスクされる。

$ awx export > full_backup_$(date +%F).json
This endpoint is deprecated: /api/controller/v2/users/1/roles/
This endpoint is deprecated: /api/controller/v2/organizations/1/object_roles/
This endpoint is deprecated: /api/controller/v2/credentials/1/object_roles/
This endpoint is deprecated: /api/controller/v2/projects/6/object_roles/
This endpoint is deprecated: /api/controller/v2/inventories/1/object_roles/
This endpoint is deprecated: /api/controller/v2/job_templates/7/object_roles/
$ wc full_backup_2025-06-30.json
  437   877 16474 full_backup_2025-06-30.json

$ head full_backup_2025-06-30.json
{
     "users": [
          {
               "username": "admin",
               "first_name": "",
               "last_name": "",
               "email": "admin@example.com",
               "is_superuser": true,
               "is_system_auditor": false,
               "password": "$encrypted$",

$ egrep "^[^ ]|^     [^ ]" full_backup_2025-06-30.json
{
     "users": [
     ],
     "organizations": [
     ],
     "teams": [],
     "credential_types": [],
     "credentials": [
     ],
     "notification_templates": [],
     "projects": [
     ],
     "inventory": [
     ],
     "inventory_sources": [],
     "job_templates": [
     ],
     "workflow_job_templates": [],
     "execution_environments": [
     ],
     "applications": [],
     "schedules": [
     ]
}
0
0
0

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
0
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?