$ aws ssm list-command-invocations –command-id xxxxx-xxxxx-xxxxxx –details
{
“CommandInvocations”: [
{
“Comment”: “20221204 Ansible Test yum update”,
“Status”: “Success“, ← 成功かどうか確認できます。
“CommandPlugins”: [
{
“Status”: “Success”,
“ResponseStartDateTime”: 1670142993.204,
“StandardErrorUrl”: “”,
“OutputS3BucketName”: “”,
“OutputS3Region”: “ap-northeast-1”,
“OutputS3KeyPrefix”: “”,
“ResponseCode”: 0,
“Output”: “Content downloaded to /var/lib/amazon/ssm/i-0xxxxxx/document/orchestration/xxxxxxxxxxxx/downloads/”,
“ResponseFinishDateTime”: 1670142993.364,
“StatusDetails”: “Success”,
“StandardOutputUrl”: “”,
“Name”: “downloadContent”
},
{
“Status”: “Success”,
“ResponseStartDateTime”: 1670142993.364,
“StandardErrorUrl”: “”,
“OutputS3BucketName”: “”,
“OutputS3Region”: “ap-northeast-1”,
“OutputS3KeyPrefix”: “”,
“ResponseCode”: 0,
“Output”: “Amazon Linux release 2 (Karoo)\nLoaded plugins: extras_suggestions, langpacks, priorities, update-motd\nExamining /var/tmp/yum-root-HVmtT2/epel-release-latest-7.noarch.rpm: epel-release-7-14.noarch\n/var/tmp/yum-root-HVmtT2/epel-release-latest-7.noarch.rpm: does not update installed package.\nLoaded plugins: extras_suggestions, langpacks, priorities, update-motd\n227 packages excluded due to repository priority protections\nPackage ansible-2.9.27-1.el7.noarch already installed and latest version\nNothing to do\nLoaded plugins: extras_suggestions, langpacks, priorities, update-motd\n227 packages excluded due to repository priority protections\nPackage unzip-6.0-43.amzn2.x86_64 already installed and latest version\nNothing to do\nRunning Ansible in /var/lib/amazon/ssm/i-0xxxxxxxxxxx/document/orchestration/xxxxxxxxxxxxxxx/downloads\nArchive: ./test_yum_update.zip\n creating: test_yum_update/\n inflating: test_yum_update/server.yml \n creating: test_yum_update/roles/\n creating: test_yum_update/roles/common/\n creating: test_yum_update/roles/common/tasks/\n inflating: test_yum_update/roles/common/tasks/main.yml \nansible-playbook 2.9.27\n config file = /etc/ansible/ansible.cfg\n configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]\n ansible python module location = /usr/lib/python2.7/site-packages/ansible\n executable location = /usr/bin/ansible-playbook\n python version = 2.7.18 (default, May 25 2022, 14:30:51) [GCC 7.3.1 20180712 (Red Hat 7.3.1-15)]\nUsing /etc/ansible/ansible.cfg as config file\nsetting up inventory plugins\nSet default localhost to localhost\nParsed localhost, inventory source with host_list plugin\nLoading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc\nSkipping callback ‘actionable’, as we already have a stdout callback.\nSkipping callback ‘counter_enabled’, as we already have a stdout callback.\nSkipping callback ‘debug’, as we already have a stdout callback.\nSkipping callback ‘den\n—Output truncated—\n———-ERROR——-\nInstalling and or updating required tools: Ansible, wget unzip ….\nError: Nothing to do\n[WARNING]: Platform linux on host localhost is using the discovered Python\ninterpreter at /usr/bin/python, but future installation of another Python\ninterpreter could change this. See https://docs.ansible.com/ansible/2.9/referen\nce_appendices/interpreter_discovery.html for more information.\n”,
“ResponseFinishDateTime”: 1670143010.507,
“StatusDetails”: “Success”,
“StandardOutputUrl”: “”,
“Name”: “runShellScript”
}
],
“ServiceRole”: “”,
“CloudWatchOutputConfig”: {
“CloudWatchLogGroupName”: “”,
“CloudWatchOutputEnabled”: false
},
“InstanceId”: “i-0xxxxxxxxx”,
“DocumentName”: “AWS-ApplyAnsiblePlaybooks”,
“NotificationConfig”: {
“NotificationArn”: “”,
“NotificationEvents”: [],
“NotificationType”: “”
},
“DocumentVersion”: “1”,
“StatusDetails”: “Success”,
“StandardOutputUrl”: “”,
“StandardErrorUrl”: “”,
“InstanceName”: “ip-172-xxxxxxx.ap-northeast-1.compute.internal”,
“CommandId”: “xxxxxxxxxxxxxxxx”,
“RequestedDateTime”: 1670142992.963
}
]
}
|
コメント