Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ssm connection plugin fails at gathering facts #558

Merged

Conversation

Filirom1
Copy link
Contributor

@Filirom1 Filirom1 commented Apr 28, 2021

SUMMARY

Apply diff proposed by @thomas-anderson-bsl #113 (comment)

Fix #113
Fix #1163

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

aws_ssm

ADDITIONAL INFORMATION

Currently the example is failing on my Linux laptop

[vagrant@centos8 test]$ env |grep AWS
AWS_PROFILE=TKM_NOPROD
AWS_DEFAULT_REGION=eu-west-3
AWS_SDK_LOAD_CONFIG=1
[vagrant@centos8 test]$ aws sts get-caller-identity
{
    "UserId": "AROAQIIBQ3JCUSOU4JWCK:A512753",
    "Account": "017719941701",
    "Arn": "arn:aws:sts::017719941701:assumed-role/SysAdmin/A512753"
}
[vagrant@centos8 test]$ cat linux.yaml
- name: install aws-cli
  hosts: all
  gather_facts: false
  vars:
    ansible_connection: aws_ssm
    ansible_aws_ssm_bucket_name: tkm-exported-logs
    ansible_aws_ssm_region: eu-west-3
  tasks:
  - name: aws-cli
    raw: yum install -y awscli
    tags: aws-cli
[vagrant@centos8 test]$ cat aws_ec2.yml
plugin: aws_ec2
regions:
    - eu-west-3
hostnames:
    - instance-id
filters:
    tag:SSMTag: ssmlinux
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
redirecting (type: connection) ansible.builtin.aws_ssm to community.aws.aws_ssm
Loading collection community.aws from /home/vagrant/.local/lib/python3.6/site-packages/ansible_collections/community/aws
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0c292c1774b397c6f", "TokenValue": "AAEAAf79ujbqpQGYfHpLaJiTOlhUExBJDOkiLd/Fbq/alKF7AAAAAGCJEg4Fl3ljDMM9XwWJvAyTVsF3XwDlkJzbk4+c2802jl7gIIIODbDpCdsh9YRRLe5zIb1eXcZCTAquivDmzKpNp46ZxxRg/8UK/y5zeq8SvB58Fv8ir91F9LfxQD/hjVYOXKbU6MTjBeL7/JLCrWio5jV55NjXV1PMFWVVbfYvR+lesRhPKVhFf6bO4quyCTL+bmEDVAmCJnQX52KwBSqJhKArWUjAsmCfVj/YqaPLt1xmcR+CMlwO/x1VZPm6n2BBpFRr856bxsmVdEBOl/ckwsOK9k3JrTGQQuGxAVplO5rKlynBD15h2J4/CX1f2RiPOQghLyLSOUaSMA/o0MJMFkD7vMztgswj91lTqJKEu5O5fV1/3s1FnqRrXfFV6/+tcECoaDPxqbPvBiouN+5HHw4S", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0c292c1774b397c6f?role=publish_subscribe", "ResponseMetadata": {"RequestId": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:43:10 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo MjGohIiJUEeYoYWfZIfzrUfbLg
sudo yum install -y awscli
echo $'\n'$?
echo YoJSNqxmpcVfcJGJRJVfIteacP
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ MjGohIiJUEeYoYWfZIfzrUfbLg
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 57
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 0, cmd (yum install -y awscli...), pausing for 0 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0d6533239e4db8272", "TokenValue": "AAEAAcua+Crf0t+FmSNgvZSpxTvDQksaWVQiDjJ96ZmNStp0AAAAAGCJEkzdO6ZTkt7WRjUVePEQ7dys7SUGc/Ys8sPyn9r/gKqfi9g84j8uc6HaLKbB/jmrdVSdGMBVNvDEZtgeSpJMSRqZ/jPjB9jW0RHXCia8161lzpG6mnACyoL/bt6l1zpXA98sa4NFbaBRATXP+Rwd+gNONSn40kLYWegp/hvnsCgRsE70FfSrH+9NNsCpNvMli1TexqTuoQB1xz7MUnsMEwc/kkHM8NDcpEH+AGbNbVlSy3pLVe2EPS0ps2ElPp9WKpMrkywhN2LZT510TgRK6UoS23QBp2ZxqNPZLgK/qZh91M++pXYX/kBX5ACpOdBSccyMyHMN+aO//690zfC7Glk6t+i68R9odMFesPrDGPeWvhfZvtEuxW6TIOYLVqNOG7xR6/ilcGir7wrHNLvAmw4M", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0d6533239e4db8272?role=publish_subscribe", "ResponseMetadata": {"RequestId": "48b9d452-99da-4b4d-9e30-148c4648760e", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:44:12 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "48b9d452-99da-4b4d-9e30-148c4648760e"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo AhNjLyNqKvKkPpDrBmFRWXQhYa
sudo yum install -y awscli
echo $'\n'$?
echo JuLdCBzespYaUSOaucFXezVwIt
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ AhNjLyNqKvKkPpDrBmFRWXQhYa
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 1, cmd (yum install -y awscli...), pausing for 1 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0d6533239e4db8272
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-09a773809c4290ba8", "TokenValue": "AAEAAY8euMXFMJqb6NktLar2duBd+N19wyEaDkoCkanNHU2RAAAAAGCJEoofW/XfRQ9bW2MlXFDd2V+3X2Dg9t1qHGvHkz8Ms1kHMZVNHAq4vk6YnulLLJmDf8GuBAbm1UpguJLbtdI1/dmWMXCSAHmAKwdCchds+eP4a0kBNWNCWRpa4g5igD6t+gwJNqtYFgfofbUJ1tPYenBUHtP/iYaWloP9NKXMDlcxB80mIc0jhWdK7IM+ohztD4HHWz9YLjw/yTrnUjTVMoLgoVAYp+42knhG5DYxXW6l5R6j2KUdGCgCsPmiQog9rZnpG1FR9Tr3+EpuEQhxZ4jRQA7Oez12KE1TMCcp5y22pg1i2tZ5bSu+NreIBmorVTay0RSoGtVCIGvcFs0T3UIQZQtlGwNhwpbOFqyT50d6N99zw7chzv5ORi3ilmweSIEqbUFTaCfCGxy7bOX+br5z", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-09a773809c4290ba8?role=publish_subscribe", "ResponseMetadata": {"RequestId": "6f105bd2-61c4-49b3-92b5-64b71149161d", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:45:14 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "6f105bd2-61c4-49b3-92b5-64b71149161d"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo fxUMwVtRygloIfujoykKZqsRYQ
sudo yum install -y awscli
echo $'\n'$?
echo meoFrFEeqnsFelOUcbgYMqWcqf
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ fxUMwVtRygloIfujoykKZqsRYQ
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 2, cmd (yum install -y awscli...), pausing for 3 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-09a773809c4290ba8
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-04ce28f1ed0a9b2cc", "TokenValue": "AAEAAWShVQvs4lr+jZzebJuPI/kjqeHN9aRbG8Ga+dDyG92JAAAAAGCJEsu8ji1RBCTYUF6gZuRvoNRCynBSdcj5DEXOx/aGcIvd9dhQ35CL3yqd6vc2SG3CfGuVDrzaPjXdqbSpK8vYeC8T6o1iqCQQZTWRjx3hv1JPNcIvqKToXnVNYEehyuqL9AiEwjsp4BKsj+1GyZaONSEhu3hGv7CaU0lLwsZSeLNx/gUo48QKJJdfUFhAfElnlyt/bLgAFNokPWfhJo9C8eJaGUbPjGx5q5fFajpbCt56XE6bMqdvDkQq0rL0CCVOa8OwcXrq1cixwj8zyVJRk4r1xFaxVJUrNSiZjBef8XnuIJSwJGS4rqW3xj7MAcN+fP37cwsvRDXzaJiaNIQixd4BMUJT9DKBTnt5k8CKlkig/1CkLiqRfpTt/1dDrk3ijIn+WmijmUIGzXGTASXf4NL4", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-04ce28f1ed0a9b2cc?role=publish_subscribe", "ResponseMetadata": {"RequestId": "079764cf-ef62-4378-a6a7-c1aa982b2175", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:46:19 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "079764cf-ef62-4378-a6a7-c1aa982b2175"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo mYEabajpUREmWopOVdtXWVjhjA
sudo yum install -y awscli
echo $'\n'$?
echo HUOIrDSkTqNbXtGnpsfqUWmKse
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ mYEabajpUREmWopOVdtXWVjhjA
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-04ce28f1ed0a9b2cc
fatal: [i-01a919b33286168b1]: UNREACHABLE! => {
    "changed": false,
    "msg": "SSM exec_command timeout on host: i-01a919b33286168b1",
    "unreachable": true
}

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0

When I apply the patch, it works well

[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-03fc91cde78438694", "TokenValue": "AAEAAW/9pxZQ5rD36JpYalo7sawVweoKITNNtI4392BVkuEDAAAAAGCJE4m7i9Fiy79NAlD8WLAXo1Ybury4avfnW75u3V57mFHcOLF/NHkGHVrg9CgaddaKEdq46EmXmpnqL4BJ/bUzE6sm8YpX/JyLmxnuBaOMMfTEpBdTmTdEjJfq3JeRG3ze4klZwUAO3Bkr6Y4PebzPDSsiC9cYa/vF7JKWS05BR80j0eX3JrI02NQs6Xl4R12D88l80kxvhorMtSwdSuwVrfDJtVSX0AgRpDgc3ZaeoZOl6INJSz1joXdykO6J6sFNUorQwLYVOet8EgHRHSxes2rhWccZxsNWA4WDqLe4yJ53/aVfvEtAXrC5sB/dEdyh0HaT7e3xZJGgTLqkY8tPZ1t96ftCU4WCGyqcmsey6AHjY4pyKzspibjtb+3mQiFmhHVY2qXJdNm/GK8QiM3KvDNV", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-03fc91cde78438694?role=publish_subscribe", "ResponseMetadata": {"RequestId": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:49:29 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n'
<i-01a919b33286168b1> PRE startup output received
<i-01a919b33286168b1> PRE Disabling Echo: b'stty -echo\n'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ '
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ s'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ '
<i-01a919b33286168b1> PRE Disabling Prompt: b"PS1='' ; printf '\\n%s\\n' 'tzLzeOyQfgbHdOairfXctIHvCE'\n"
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ \r\r\ntzLzeOyQfgbHdOairfXctIHvCE\r\r\n'
<i-01a919b33286168b1> PRE Terminal configured
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-03fc91cde78438694
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'printf '%s\n' 'unVADXWGDhKpmPYyJlyAahHsWK';
echo | sudo yum install -y awscli;
printf '\n%s\n%s\n' "$?" 'swsasimtXIvBgCtvgOQifPBsrV';
'
<i-01a919b33286168b1> EXEC stdout line: unVADXWGDhKpmPYyJlyAahHsWK
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: 0
<i-01a919b33286168b1> EXEC stdout line: swsasimtXIvBgCtvgOQifPBsrV
<i-01a919b33286168b1> POST_PROCESS: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do

0
<i-01a919b33286168b1> (0, 'Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r', '')
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-03fc91cde78438694
changed: [i-01a919b33286168b1] => {
    "changed": true,
    "rc": 0,
    "stderr": "",
    "stderr_lines": [],
    "stdout": "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r",
    "stdout_lines": [
        "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd",
        "",
        "",
        "",
        "amzn2-core                                               | 3.7 kB     00:00     ",
        "",
        "",
        "332 packages excluded due to repository priority protections",
        "",
        "",
        "Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version",
        "",
        "",
        "Nothing to do",
        "",
        ""
    ]
}
META: ran handlers
META: ran handlers

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

With the patch, it also works with gather_facts: true

@ansibullbot
Copy link

@Filirom1 This PR contains @ mentions in at least one commit message. Those mentions can cause cascading notifications through GitHub and need to be removed. Please squash or amend your commits to remove the mentions.

click here for bot help

@ansibullbot ansibullbot added bug This issue/PR relates to a bug connection connection plugin needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) python3 labels Apr 28, 2021
@Filirom1
Copy link
Contributor Author

@ansibullbot I removed the @ mention

@ansibullbot ansibullbot added community_review and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Apr 28, 2021
@goneri
Copy link
Member

goneri commented Apr 30, 2021

Hi @Filirom1,

Thank you for your PR. There is some sanity issues that we need to address before we can merge the PR. Can you also add a changelog fragment https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment ?

@jillr jillr added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed needs_triage labels Jun 15, 2021
@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Jun 15, 2021
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this pull request May 25, 2022
Add missing entry to AWS action group

SUMMARY
When migrating ec2_instance we missed adding the ec2_instance_facts alias to the AWS action group
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
meta/runtime.yml
ADDITIONAL INFORMATION
fixes: ansible-collections#557

Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

✔️ ansible-galaxy-importer SUCCESS in 3m 43s
✔️ build-ansible-collection SUCCESS in 7m 29s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 56s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 9m 47s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 34s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 10m 32s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 12s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 5m 53s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 5m 30s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 24s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 5m 59s
✔️ ansible-test-changelog SUCCESS in 2m 31s
✔️ ansible-test-splitter SUCCESS in 3m 17s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@tremble tremble added backport-4 PR should be backported to the stable-4 branch backport-5 PR should be backported to the stable-5 branch mergeit Merge the PR (SoftwareFactory) labels Jan 12, 2023
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

✔️ ansible-galaxy-importer SUCCESS in 4m 36s
✔️ build-ansible-collection SUCCESS in 5m 52s
✔️ ansible-test-sanity-docker-devel SUCCESS in 9m 36s (non-voting)
✔️ ansible-test-sanity-docker-milestone SUCCESS in 10m 47s (non-voting)
✔️ ansible-test-sanity-docker-stable-2.12 SUCCESS in 10m 58s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 11m 10s
✔️ ansible-test-sanity-docker-stable-2.14 SUCCESS in 10m 42s
✔️ ansible-test-units-amazon-aws-python36 SUCCESS in 7m 02s
✔️ ansible-test-units-amazon-aws-python38 SUCCESS in 6m 02s
✔️ ansible-test-units-amazon-aws-python39 SUCCESS in 6m 27s
✔️ ansible-test-units-amazon-aws-python310 SUCCESS in 6m 34s
✔️ ansible-test-changelog SUCCESS in 2m 37s
✔️ ansible-test-splitter SUCCESS in 3m 02s
⚠️ integration-community.aws-1 SKIPPED
⚠️ integration-community.aws-2 SKIPPED
⚠️ integration-community.aws-3 SKIPPED
⚠️ integration-community.aws-4 SKIPPED
⚠️ integration-community.aws-5 SKIPPED
⚠️ integration-community.aws-6 SKIPPED
⚠️ integration-community.aws-7 SKIPPED
⚠️ integration-community.aws-8 SKIPPED
⚠️ integration-community.aws-9 SKIPPED
⚠️ integration-community.aws-10 SKIPPED
⚠️ integration-community.aws-11 SKIPPED
⚠️ integration-community.aws-12 SKIPPED
⚠️ integration-community.aws-13 SKIPPED
⚠️ integration-community.aws-14 SKIPPED
⚠️ integration-community.aws-15 SKIPPED
⚠️ integration-community.aws-16 SKIPPED
⚠️ integration-community.aws-17 SKIPPED
⚠️ integration-community.aws-18 SKIPPED
⚠️ integration-community.aws-19 SKIPPED
⚠️ integration-community.aws-20 SKIPPED
⚠️ integration-community.aws-21 SKIPPED
⚠️ integration-community.aws-22 SKIPPED

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit a5b44b8 into ansible-collections:main Jan 12, 2023
@patchback
Copy link

patchback bot commented Jan 12, 2023

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/a5b44b8a30129e46ed64aef2e6ee1c629db1548b/pr-558

Backported as #1653

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 12, 2023
fix ssm connection plugin fails at gathering facts

SUMMARY
Apply diff proposed by @thomas-anderson-bsl #113 (comment)
Fix #113
Fix #1163
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Currently the example is failing on my Linux laptop
[vagrant@centos8 test]$ env |grep AWS
AWS_PROFILE=TKM_NOPROD
AWS_DEFAULT_REGION=eu-west-3
AWS_SDK_LOAD_CONFIG=1
[vagrant@centos8 test]$ aws sts get-caller-identity
{
    "UserId": "AROAQIIBQ3JCUSOU4JWCK:A512753",
    "Account": "017719941701",
    "Arn": "arn:aws:sts::017719941701:assumed-role/SysAdmin/A512753"
}
[vagrant@centos8 test]$ cat linux.yaml
- name: install aws-cli
  hosts: all
  gather_facts: false
  vars:
    ansible_connection: aws_ssm
    ansible_aws_ssm_bucket_name: tkm-exported-logs
    ansible_aws_ssm_region: eu-west-3
  tasks:
  - name: aws-cli
    raw: yum install -y awscli
    tags: aws-cli
[vagrant@centos8 test]$ cat aws_ec2.yml
plugin: aws_ec2
regions:
    - eu-west-3
hostnames:
    - instance-id
filters:
    tag:SSMTag: ssmlinux
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
redirecting (type: connection) ansible.builtin.aws_ssm to community.aws.aws_ssm
Loading collection community.aws from /home/vagrant/.local/lib/python3.6/site-packages/ansible_collections/community/aws
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0c292c1774b397c6f", "TokenValue": "AAEAAf79ujbqpQGYfHpLaJiTOlhUExBJDOkiLd/Fbq/alKF7AAAAAGCJEg4Fl3ljDMM9XwWJvAyTVsF3XwDlkJzbk4+c2802jl7gIIIODbDpCdsh9YRRLe5zIb1eXcZCTAquivDmzKpNp46ZxxRg/8UK/y5zeq8SvB58Fv8ir91F9LfxQD/hjVYOXKbU6MTjBeL7/JLCrWio5jV55NjXV1PMFWVVbfYvR+lesRhPKVhFf6bO4quyCTL+bmEDVAmCJnQX52KwBSqJhKArWUjAsmCfVj/YqaPLt1xmcR+CMlwO/x1VZPm6n2BBpFRr856bxsmVdEBOl/ckwsOK9k3JrTGQQuGxAVplO5rKlynBD15h2J4/CX1f2RiPOQghLyLSOUaSMA/o0MJMFkD7vMztgswj91lTqJKEu5O5fV1/3s1FnqRrXfFV6/+tcECoaDPxqbPvBiouN+5HHw4S", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0c292c1774b397c6f?role=publish_subscribe", "ResponseMetadata": {"RequestId": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:43:10 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo MjGohIiJUEeYoYWfZIfzrUfbLg
sudo yum install -y awscli
echo $'\n'$?
echo YoJSNqxmpcVfcJGJRJVfIteacP
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ MjGohIiJUEeYoYWfZIfzrUfbLg
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 57
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 0, cmd (yum install -y awscli...), pausing for 0 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0d6533239e4db8272", "TokenValue": "AAEAAcua+Crf0t+FmSNgvZSpxTvDQksaWVQiDjJ96ZmNStp0AAAAAGCJEkzdO6ZTkt7WRjUVePEQ7dys7SUGc/Ys8sPyn9r/gKqfi9g84j8uc6HaLKbB/jmrdVSdGMBVNvDEZtgeSpJMSRqZ/jPjB9jW0RHXCia8161lzpG6mnACyoL/bt6l1zpXA98sa4NFbaBRATXP+Rwd+gNONSn40kLYWegp/hvnsCgRsE70FfSrH+9NNsCpNvMli1TexqTuoQB1xz7MUnsMEwc/kkHM8NDcpEH+AGbNbVlSy3pLVe2EPS0ps2ElPp9WKpMrkywhN2LZT510TgRK6UoS23QBp2ZxqNPZLgK/qZh91M++pXYX/kBX5ACpOdBSccyMyHMN+aO//690zfC7Glk6t+i68R9odMFesPrDGPeWvhfZvtEuxW6TIOYLVqNOG7xR6/ilcGir7wrHNLvAmw4M", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0d6533239e4db8272?role=publish_subscribe", "ResponseMetadata": {"RequestId": "48b9d452-99da-4b4d-9e30-148c4648760e", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:44:12 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "48b9d452-99da-4b4d-9e30-148c4648760e"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo AhNjLyNqKvKkPpDrBmFRWXQhYa
sudo yum install -y awscli
echo $'\n'$?
echo JuLdCBzespYaUSOaucFXezVwIt
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ AhNjLyNqKvKkPpDrBmFRWXQhYa
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 1, cmd (yum install -y awscli...), pausing for 1 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0d6533239e4db8272
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-09a773809c4290ba8", "TokenValue": "AAEAAY8euMXFMJqb6NktLar2duBd+N19wyEaDkoCkanNHU2RAAAAAGCJEoofW/XfRQ9bW2MlXFDd2V+3X2Dg9t1qHGvHkz8Ms1kHMZVNHAq4vk6YnulLLJmDf8GuBAbm1UpguJLbtdI1/dmWMXCSAHmAKwdCchds+eP4a0kBNWNCWRpa4g5igD6t+gwJNqtYFgfofbUJ1tPYenBUHtP/iYaWloP9NKXMDlcxB80mIc0jhWdK7IM+ohztD4HHWz9YLjw/yTrnUjTVMoLgoVAYp+42knhG5DYxXW6l5R6j2KUdGCgCsPmiQog9rZnpG1FR9Tr3+EpuEQhxZ4jRQA7Oez12KE1TMCcp5y22pg1i2tZ5bSu+NreIBmorVTay0RSoGtVCIGvcFs0T3UIQZQtlGwNhwpbOFqyT50d6N99zw7chzv5ORi3ilmweSIEqbUFTaCfCGxy7bOX+br5z", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-09a773809c4290ba8?role=publish_subscribe", "ResponseMetadata": {"RequestId": "6f105bd2-61c4-49b3-92b5-64b71149161d", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:45:14 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "6f105bd2-61c4-49b3-92b5-64b71149161d"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo fxUMwVtRygloIfujoykKZqsRYQ
sudo yum install -y awscli
echo $'\n'$?
echo meoFrFEeqnsFelOUcbgYMqWcqf
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ fxUMwVtRygloIfujoykKZqsRYQ
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 2, cmd (yum install -y awscli...), pausing for 3 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-09a773809c4290ba8
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-04ce28f1ed0a9b2cc", "TokenValue": "AAEAAWShVQvs4lr+jZzebJuPI/kjqeHN9aRbG8Ga+dDyG92JAAAAAGCJEsu8ji1RBCTYUF6gZuRvoNRCynBSdcj5DEXOx/aGcIvd9dhQ35CL3yqd6vc2SG3CfGuVDrzaPjXdqbSpK8vYeC8T6o1iqCQQZTWRjx3hv1JPNcIvqKToXnVNYEehyuqL9AiEwjsp4BKsj+1GyZaONSEhu3hGv7CaU0lLwsZSeLNx/gUo48QKJJdfUFhAfElnlyt/bLgAFNokPWfhJo9C8eJaGUbPjGx5q5fFajpbCt56XE6bMqdvDkQq0rL0CCVOa8OwcXrq1cixwj8zyVJRk4r1xFaxVJUrNSiZjBef8XnuIJSwJGS4rqW3xj7MAcN+fP37cwsvRDXzaJiaNIQixd4BMUJT9DKBTnt5k8CKlkig/1CkLiqRfpTt/1dDrk3ijIn+WmijmUIGzXGTASXf4NL4", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-04ce28f1ed0a9b2cc?role=publish_subscribe", "ResponseMetadata": {"RequestId": "079764cf-ef62-4378-a6a7-c1aa982b2175", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:46:19 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "079764cf-ef62-4378-a6a7-c1aa982b2175"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo mYEabajpUREmWopOVdtXWVjhjA
sudo yum install -y awscli
echo $'\n'$?
echo HUOIrDSkTqNbXtGnpsfqUWmKse
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ mYEabajpUREmWopOVdtXWVjhjA
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-04ce28f1ed0a9b2cc
fatal: [i-01a919b33286168b1]: UNREACHABLE! => {
    "changed": false,
    "msg": "SSM exec_command timeout on host: i-01a919b33286168b1",
    "unreachable": true
}

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
When I apply the patch, it works well
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-03fc91cde78438694", "TokenValue": "AAEAAW/9pxZQ5rD36JpYalo7sawVweoKITNNtI4392BVkuEDAAAAAGCJE4m7i9Fiy79NAlD8WLAXo1Ybury4avfnW75u3V57mFHcOLF/NHkGHVrg9CgaddaKEdq46EmXmpnqL4BJ/bUzE6sm8YpX/JyLmxnuBaOMMfTEpBdTmTdEjJfq3JeRG3ze4klZwUAO3Bkr6Y4PebzPDSsiC9cYa/vF7JKWS05BR80j0eX3JrI02NQs6Xl4R12D88l80kxvhorMtSwdSuwVrfDJtVSX0AgRpDgc3ZaeoZOl6INJSz1joXdykO6J6sFNUorQwLYVOet8EgHRHSxes2rhWccZxsNWA4WDqLe4yJ53/aVfvEtAXrC5sB/dEdyh0HaT7e3xZJGgTLqkY8tPZ1t96ftCU4WCGyqcmsey6AHjY4pyKzspibjtb+3mQiFmhHVY2qXJdNm/GK8QiM3KvDNV", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-03fc91cde78438694?role=publish_subscribe", "ResponseMetadata": {"RequestId": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:49:29 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n'
<i-01a919b33286168b1> PRE startup output received
<i-01a919b33286168b1> PRE Disabling Echo: b'stty -echo\n'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ '
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ s'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ '
<i-01a919b33286168b1> PRE Disabling Prompt: b"PS1='' ; printf '\\n%s\\n' 'tzLzeOyQfgbHdOairfXctIHvCE'\n"
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ \r\r\ntzLzeOyQfgbHdOairfXctIHvCE\r\r\n'
<i-01a919b33286168b1> PRE Terminal configured
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-03fc91cde78438694
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'printf '%s\n' 'unVADXWGDhKpmPYyJlyAahHsWK';
echo | sudo yum install -y awscli;
printf '\n%s\n%s\n' "$?" 'swsasimtXIvBgCtvgOQifPBsrV';
'
<i-01a919b33286168b1> EXEC stdout line: unVADXWGDhKpmPYyJlyAahHsWK
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: 0
<i-01a919b33286168b1> EXEC stdout line: swsasimtXIvBgCtvgOQifPBsrV
<i-01a919b33286168b1> POST_PROCESS: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do

0
<i-01a919b33286168b1> (0, 'Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r', '')
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-03fc91cde78438694
changed: [i-01a919b33286168b1] => {
    "changed": true,
    "rc": 0,
    "stderr": "",
    "stderr_lines": [],
    "stdout": "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r",
    "stdout_lines": [
        "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd",
        "",
        "",
        "",
        "amzn2-core                                               | 3.7 kB     00:00     ",
        "",
        "",
        "332 packages excluded due to repository priority protections",
        "",
        "",
        "Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version",
        "",
        "",
        "Nothing to do",
        "",
        ""
    ]
}
META: ran handlers
META: ran handlers

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
With the patch, it also works with gather_facts: true

Reviewed-by: Mark Chappell <None>
(cherry picked from commit a5b44b8)
@patchback
Copy link

patchback bot commented Jan 12, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/a5b44b8a30129e46ed64aef2e6ee1c629db1548b/pr-558

Backported as #1654

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 12, 2023
fix ssm connection plugin fails at gathering facts

SUMMARY
Apply diff proposed by @thomas-anderson-bsl #113 (comment)
Fix #113
Fix #1163
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Currently the example is failing on my Linux laptop
[vagrant@centos8 test]$ env |grep AWS
AWS_PROFILE=TKM_NOPROD
AWS_DEFAULT_REGION=eu-west-3
AWS_SDK_LOAD_CONFIG=1
[vagrant@centos8 test]$ aws sts get-caller-identity
{
    "UserId": "AROAQIIBQ3JCUSOU4JWCK:A512753",
    "Account": "017719941701",
    "Arn": "arn:aws:sts::017719941701:assumed-role/SysAdmin/A512753"
}
[vagrant@centos8 test]$ cat linux.yaml
- name: install aws-cli
  hosts: all
  gather_facts: false
  vars:
    ansible_connection: aws_ssm
    ansible_aws_ssm_bucket_name: tkm-exported-logs
    ansible_aws_ssm_region: eu-west-3
  tasks:
  - name: aws-cli
    raw: yum install -y awscli
    tags: aws-cli
[vagrant@centos8 test]$ cat aws_ec2.yml
plugin: aws_ec2
regions:
    - eu-west-3
hostnames:
    - instance-id
filters:
    tag:SSMTag: ssmlinux
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
redirecting (type: connection) ansible.builtin.aws_ssm to community.aws.aws_ssm
Loading collection community.aws from /home/vagrant/.local/lib/python3.6/site-packages/ansible_collections/community/aws
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0c292c1774b397c6f", "TokenValue": "AAEAAf79ujbqpQGYfHpLaJiTOlhUExBJDOkiLd/Fbq/alKF7AAAAAGCJEg4Fl3ljDMM9XwWJvAyTVsF3XwDlkJzbk4+c2802jl7gIIIODbDpCdsh9YRRLe5zIb1eXcZCTAquivDmzKpNp46ZxxRg/8UK/y5zeq8SvB58Fv8ir91F9LfxQD/hjVYOXKbU6MTjBeL7/JLCrWio5jV55NjXV1PMFWVVbfYvR+lesRhPKVhFf6bO4quyCTL+bmEDVAmCJnQX52KwBSqJhKArWUjAsmCfVj/YqaPLt1xmcR+CMlwO/x1VZPm6n2BBpFRr856bxsmVdEBOl/ckwsOK9k3JrTGQQuGxAVplO5rKlynBD15h2J4/CX1f2RiPOQghLyLSOUaSMA/o0MJMFkD7vMztgswj91lTqJKEu5O5fV1/3s1FnqRrXfFV6/+tcECoaDPxqbPvBiouN+5HHw4S", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0c292c1774b397c6f?role=publish_subscribe", "ResponseMetadata": {"RequestId": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:43:10 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo MjGohIiJUEeYoYWfZIfzrUfbLg
sudo yum install -y awscli
echo $'\n'$?
echo YoJSNqxmpcVfcJGJRJVfIteacP
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ MjGohIiJUEeYoYWfZIfzrUfbLg
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 57
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 0, cmd (yum install -y awscli...), pausing for 0 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0d6533239e4db8272", "TokenValue": "AAEAAcua+Crf0t+FmSNgvZSpxTvDQksaWVQiDjJ96ZmNStp0AAAAAGCJEkzdO6ZTkt7WRjUVePEQ7dys7SUGc/Ys8sPyn9r/gKqfi9g84j8uc6HaLKbB/jmrdVSdGMBVNvDEZtgeSpJMSRqZ/jPjB9jW0RHXCia8161lzpG6mnACyoL/bt6l1zpXA98sa4NFbaBRATXP+Rwd+gNONSn40kLYWegp/hvnsCgRsE70FfSrH+9NNsCpNvMli1TexqTuoQB1xz7MUnsMEwc/kkHM8NDcpEH+AGbNbVlSy3pLVe2EPS0ps2ElPp9WKpMrkywhN2LZT510TgRK6UoS23QBp2ZxqNPZLgK/qZh91M++pXYX/kBX5ACpOdBSccyMyHMN+aO//690zfC7Glk6t+i68R9odMFesPrDGPeWvhfZvtEuxW6TIOYLVqNOG7xR6/ilcGir7wrHNLvAmw4M", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0d6533239e4db8272?role=publish_subscribe", "ResponseMetadata": {"RequestId": "48b9d452-99da-4b4d-9e30-148c4648760e", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:44:12 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "48b9d452-99da-4b4d-9e30-148c4648760e"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo AhNjLyNqKvKkPpDrBmFRWXQhYa
sudo yum install -y awscli
echo $'\n'$?
echo JuLdCBzespYaUSOaucFXezVwIt
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ AhNjLyNqKvKkPpDrBmFRWXQhYa
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 1, cmd (yum install -y awscli...), pausing for 1 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0d6533239e4db8272
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-09a773809c4290ba8", "TokenValue": "AAEAAY8euMXFMJqb6NktLar2duBd+N19wyEaDkoCkanNHU2RAAAAAGCJEoofW/XfRQ9bW2MlXFDd2V+3X2Dg9t1qHGvHkz8Ms1kHMZVNHAq4vk6YnulLLJmDf8GuBAbm1UpguJLbtdI1/dmWMXCSAHmAKwdCchds+eP4a0kBNWNCWRpa4g5igD6t+gwJNqtYFgfofbUJ1tPYenBUHtP/iYaWloP9NKXMDlcxB80mIc0jhWdK7IM+ohztD4HHWz9YLjw/yTrnUjTVMoLgoVAYp+42knhG5DYxXW6l5R6j2KUdGCgCsPmiQog9rZnpG1FR9Tr3+EpuEQhxZ4jRQA7Oez12KE1TMCcp5y22pg1i2tZ5bSu+NreIBmorVTay0RSoGtVCIGvcFs0T3UIQZQtlGwNhwpbOFqyT50d6N99zw7chzv5ORi3ilmweSIEqbUFTaCfCGxy7bOX+br5z", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-09a773809c4290ba8?role=publish_subscribe", "ResponseMetadata": {"RequestId": "6f105bd2-61c4-49b3-92b5-64b71149161d", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:45:14 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "6f105bd2-61c4-49b3-92b5-64b71149161d"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo fxUMwVtRygloIfujoykKZqsRYQ
sudo yum install -y awscli
echo $'\n'$?
echo meoFrFEeqnsFelOUcbgYMqWcqf
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ fxUMwVtRygloIfujoykKZqsRYQ
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 2, cmd (yum install -y awscli...), pausing for 3 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-09a773809c4290ba8
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-04ce28f1ed0a9b2cc", "TokenValue": "AAEAAWShVQvs4lr+jZzebJuPI/kjqeHN9aRbG8Ga+dDyG92JAAAAAGCJEsu8ji1RBCTYUF6gZuRvoNRCynBSdcj5DEXOx/aGcIvd9dhQ35CL3yqd6vc2SG3CfGuVDrzaPjXdqbSpK8vYeC8T6o1iqCQQZTWRjx3hv1JPNcIvqKToXnVNYEehyuqL9AiEwjsp4BKsj+1GyZaONSEhu3hGv7CaU0lLwsZSeLNx/gUo48QKJJdfUFhAfElnlyt/bLgAFNokPWfhJo9C8eJaGUbPjGx5q5fFajpbCt56XE6bMqdvDkQq0rL0CCVOa8OwcXrq1cixwj8zyVJRk4r1xFaxVJUrNSiZjBef8XnuIJSwJGS4rqW3xj7MAcN+fP37cwsvRDXzaJiaNIQixd4BMUJT9DKBTnt5k8CKlkig/1CkLiqRfpTt/1dDrk3ijIn+WmijmUIGzXGTASXf4NL4", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-04ce28f1ed0a9b2cc?role=publish_subscribe", "ResponseMetadata": {"RequestId": "079764cf-ef62-4378-a6a7-c1aa982b2175", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:46:19 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "079764cf-ef62-4378-a6a7-c1aa982b2175"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo mYEabajpUREmWopOVdtXWVjhjA
sudo yum install -y awscli
echo $'\n'$?
echo HUOIrDSkTqNbXtGnpsfqUWmKse
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ mYEabajpUREmWopOVdtXWVjhjA
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-04ce28f1ed0a9b2cc
fatal: [i-01a919b33286168b1]: UNREACHABLE! => {
    "changed": false,
    "msg": "SSM exec_command timeout on host: i-01a919b33286168b1",
    "unreachable": true
}

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
When I apply the patch, it works well
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-03fc91cde78438694", "TokenValue": "AAEAAW/9pxZQ5rD36JpYalo7sawVweoKITNNtI4392BVkuEDAAAAAGCJE4m7i9Fiy79NAlD8WLAXo1Ybury4avfnW75u3V57mFHcOLF/NHkGHVrg9CgaddaKEdq46EmXmpnqL4BJ/bUzE6sm8YpX/JyLmxnuBaOMMfTEpBdTmTdEjJfq3JeRG3ze4klZwUAO3Bkr6Y4PebzPDSsiC9cYa/vF7JKWS05BR80j0eX3JrI02NQs6Xl4R12D88l80kxvhorMtSwdSuwVrfDJtVSX0AgRpDgc3ZaeoZOl6INJSz1joXdykO6J6sFNUorQwLYVOet8EgHRHSxes2rhWccZxsNWA4WDqLe4yJ53/aVfvEtAXrC5sB/dEdyh0HaT7e3xZJGgTLqkY8tPZ1t96ftCU4WCGyqcmsey6AHjY4pyKzspibjtb+3mQiFmhHVY2qXJdNm/GK8QiM3KvDNV", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-03fc91cde78438694?role=publish_subscribe", "ResponseMetadata": {"RequestId": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:49:29 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n'
<i-01a919b33286168b1> PRE startup output received
<i-01a919b33286168b1> PRE Disabling Echo: b'stty -echo\n'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ '
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ s'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ '
<i-01a919b33286168b1> PRE Disabling Prompt: b"PS1='' ; printf '\\n%s\\n' 'tzLzeOyQfgbHdOairfXctIHvCE'\n"
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ \r\r\ntzLzeOyQfgbHdOairfXctIHvCE\r\r\n'
<i-01a919b33286168b1> PRE Terminal configured
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-03fc91cde78438694
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'printf '%s\n' 'unVADXWGDhKpmPYyJlyAahHsWK';
echo | sudo yum install -y awscli;
printf '\n%s\n%s\n' "$?" 'swsasimtXIvBgCtvgOQifPBsrV';
'
<i-01a919b33286168b1> EXEC stdout line: unVADXWGDhKpmPYyJlyAahHsWK
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: 0
<i-01a919b33286168b1> EXEC stdout line: swsasimtXIvBgCtvgOQifPBsrV
<i-01a919b33286168b1> POST_PROCESS: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do

0
<i-01a919b33286168b1> (0, 'Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r', '')
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-03fc91cde78438694
changed: [i-01a919b33286168b1] => {
    "changed": true,
    "rc": 0,
    "stderr": "",
    "stderr_lines": [],
    "stdout": "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r",
    "stdout_lines": [
        "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd",
        "",
        "",
        "",
        "amzn2-core                                               | 3.7 kB     00:00     ",
        "",
        "",
        "332 packages excluded due to repository priority protections",
        "",
        "",
        "Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version",
        "",
        "",
        "Nothing to do",
        "",
        ""
    ]
}
META: ran handlers
META: ran handlers

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
With the patch, it also works with gather_facts: true

Reviewed-by: Mark Chappell <None>
(cherry picked from commit a5b44b8)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 12, 2023
[PR #558/a5b44b8a backport][stable-5] fix ssm connection plugin fails at gathering facts

This is a backport of PR #558 as merged into main (a5b44b8).
SUMMARY
Apply diff proposed by @thomas-anderson-bsl #113 (comment)
Fix #113
Fix #1163
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Currently the example is failing on my Linux laptop
[vagrant@centos8 test]$ env |grep AWS
AWS_PROFILE=TKM_NOPROD
AWS_DEFAULT_REGION=eu-west-3
AWS_SDK_LOAD_CONFIG=1
[vagrant@centos8 test]$ aws sts get-caller-identity
{
    "UserId": "AROAQIIBQ3JCUSOU4JWCK:A512753",
    "Account": "017719941701",
    "Arn": "arn:aws:sts::017719941701:assumed-role/SysAdmin/A512753"
}
[vagrant@centos8 test]$ cat linux.yaml
- name: install aws-cli
  hosts: all
  gather_facts: false
  vars:
    ansible_connection: aws_ssm
    ansible_aws_ssm_bucket_name: tkm-exported-logs
    ansible_aws_ssm_region: eu-west-3
  tasks:
  - name: aws-cli
    raw: yum install -y awscli
    tags: aws-cli
[vagrant@centos8 test]$ cat aws_ec2.yml
plugin: aws_ec2
regions:
    - eu-west-3
hostnames:
    - instance-id
filters:
    tag:SSMTag: ssmlinux
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
redirecting (type: connection) ansible.builtin.aws_ssm to community.aws.aws_ssm
Loading collection community.aws from /home/vagrant/.local/lib/python3.6/site-packages/ansible_collections/community/aws
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0c292c1774b397c6f", "TokenValue": "AAEAAf79ujbqpQGYfHpLaJiTOlhUExBJDOkiLd/Fbq/alKF7AAAAAGCJEg4Fl3ljDMM9XwWJvAyTVsF3XwDlkJzbk4+c2802jl7gIIIODbDpCdsh9YRRLe5zIb1eXcZCTAquivDmzKpNp46ZxxRg/8UK/y5zeq8SvB58Fv8ir91F9LfxQD/hjVYOXKbU6MTjBeL7/JLCrWio5jV55NjXV1PMFWVVbfYvR+lesRhPKVhFf6bO4quyCTL+bmEDVAmCJnQX52KwBSqJhKArWUjAsmCfVj/YqaPLt1xmcR+CMlwO/x1VZPm6n2BBpFRr856bxsmVdEBOl/ckwsOK9k3JrTGQQuGxAVplO5rKlynBD15h2J4/CX1f2RiPOQghLyLSOUaSMA/o0MJMFkD7vMztgswj91lTqJKEu5O5fV1/3s1FnqRrXfFV6/+tcECoaDPxqbPvBiouN+5HHw4S", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0c292c1774b397c6f?role=publish_subscribe", "ResponseMetadata": {"RequestId": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:43:10 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo MjGohIiJUEeYoYWfZIfzrUfbLg
sudo yum install -y awscli
echo $'\n'$?
echo YoJSNqxmpcVfcJGJRJVfIteacP
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ MjGohIiJUEeYoYWfZIfzrUfbLg
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 57
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 0, cmd (yum install -y awscli...), pausing for 0 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0d6533239e4db8272", "TokenValue": "AAEAAcua+Crf0t+FmSNgvZSpxTvDQksaWVQiDjJ96ZmNStp0AAAAAGCJEkzdO6ZTkt7WRjUVePEQ7dys7SUGc/Ys8sPyn9r/gKqfi9g84j8uc6HaLKbB/jmrdVSdGMBVNvDEZtgeSpJMSRqZ/jPjB9jW0RHXCia8161lzpG6mnACyoL/bt6l1zpXA98sa4NFbaBRATXP+Rwd+gNONSn40kLYWegp/hvnsCgRsE70FfSrH+9NNsCpNvMli1TexqTuoQB1xz7MUnsMEwc/kkHM8NDcpEH+AGbNbVlSy3pLVe2EPS0ps2ElPp9WKpMrkywhN2LZT510TgRK6UoS23QBp2ZxqNPZLgK/qZh91M++pXYX/kBX5ACpOdBSccyMyHMN+aO//690zfC7Glk6t+i68R9odMFesPrDGPeWvhfZvtEuxW6TIOYLVqNOG7xR6/ilcGir7wrHNLvAmw4M", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0d6533239e4db8272?role=publish_subscribe", "ResponseMetadata": {"RequestId": "48b9d452-99da-4b4d-9e30-148c4648760e", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:44:12 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "48b9d452-99da-4b4d-9e30-148c4648760e"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo AhNjLyNqKvKkPpDrBmFRWXQhYa
sudo yum install -y awscli
echo $'\n'$?
echo JuLdCBzespYaUSOaucFXezVwIt
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ AhNjLyNqKvKkPpDrBmFRWXQhYa
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 1, cmd (yum install -y awscli...), pausing for 1 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0d6533239e4db8272
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-09a773809c4290ba8", "TokenValue": "AAEAAY8euMXFMJqb6NktLar2duBd+N19wyEaDkoCkanNHU2RAAAAAGCJEoofW/XfRQ9bW2MlXFDd2V+3X2Dg9t1qHGvHkz8Ms1kHMZVNHAq4vk6YnulLLJmDf8GuBAbm1UpguJLbtdI1/dmWMXCSAHmAKwdCchds+eP4a0kBNWNCWRpa4g5igD6t+gwJNqtYFgfofbUJ1tPYenBUHtP/iYaWloP9NKXMDlcxB80mIc0jhWdK7IM+ohztD4HHWz9YLjw/yTrnUjTVMoLgoVAYp+42knhG5DYxXW6l5R6j2KUdGCgCsPmiQog9rZnpG1FR9Tr3+EpuEQhxZ4jRQA7Oez12KE1TMCcp5y22pg1i2tZ5bSu+NreIBmorVTay0RSoGtVCIGvcFs0T3UIQZQtlGwNhwpbOFqyT50d6N99zw7chzv5ORi3ilmweSIEqbUFTaCfCGxy7bOX+br5z", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-09a773809c4290ba8?role=publish_subscribe", "ResponseMetadata": {"RequestId": "6f105bd2-61c4-49b3-92b5-64b71149161d", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:45:14 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "6f105bd2-61c4-49b3-92b5-64b71149161d"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo fxUMwVtRygloIfujoykKZqsRYQ
sudo yum install -y awscli
echo $'\n'$?
echo meoFrFEeqnsFelOUcbgYMqWcqf
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ fxUMwVtRygloIfujoykKZqsRYQ
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 2, cmd (yum install -y awscli...), pausing for 3 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-09a773809c4290ba8
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-04ce28f1ed0a9b2cc", "TokenValue": "AAEAAWShVQvs4lr+jZzebJuPI/kjqeHN9aRbG8Ga+dDyG92JAAAAAGCJEsu8ji1RBCTYUF6gZuRvoNRCynBSdcj5DEXOx/aGcIvd9dhQ35CL3yqd6vc2SG3CfGuVDrzaPjXdqbSpK8vYeC8T6o1iqCQQZTWRjx3hv1JPNcIvqKToXnVNYEehyuqL9AiEwjsp4BKsj+1GyZaONSEhu3hGv7CaU0lLwsZSeLNx/gUo48QKJJdfUFhAfElnlyt/bLgAFNokPWfhJo9C8eJaGUbPjGx5q5fFajpbCt56XE6bMqdvDkQq0rL0CCVOa8OwcXrq1cixwj8zyVJRk4r1xFaxVJUrNSiZjBef8XnuIJSwJGS4rqW3xj7MAcN+fP37cwsvRDXzaJiaNIQixd4BMUJT9DKBTnt5k8CKlkig/1CkLiqRfpTt/1dDrk3ijIn+WmijmUIGzXGTASXf4NL4", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-04ce28f1ed0a9b2cc?role=publish_subscribe", "ResponseMetadata": {"RequestId": "079764cf-ef62-4378-a6a7-c1aa982b2175", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:46:19 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "079764cf-ef62-4378-a6a7-c1aa982b2175"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo mYEabajpUREmWopOVdtXWVjhjA
sudo yum install -y awscli
echo $'\n'$?
echo HUOIrDSkTqNbXtGnpsfqUWmKse
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ mYEabajpUREmWopOVdtXWVjhjA
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-04ce28f1ed0a9b2cc
fatal: [i-01a919b33286168b1]: UNREACHABLE! => {
    "changed": false,
    "msg": "SSM exec_command timeout on host: i-01a919b33286168b1",
    "unreachable": true
}

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
When I apply the patch, it works well
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-03fc91cde78438694", "TokenValue": "AAEAAW/9pxZQ5rD36JpYalo7sawVweoKITNNtI4392BVkuEDAAAAAGCJE4m7i9Fiy79NAlD8WLAXo1Ybury4avfnW75u3V57mFHcOLF/NHkGHVrg9CgaddaKEdq46EmXmpnqL4BJ/bUzE6sm8YpX/JyLmxnuBaOMMfTEpBdTmTdEjJfq3JeRG3ze4klZwUAO3Bkr6Y4PebzPDSsiC9cYa/vF7JKWS05BR80j0eX3JrI02NQs6Xl4R12D88l80kxvhorMtSwdSuwVrfDJtVSX0AgRpDgc3ZaeoZOl6INJSz1joXdykO6J6sFNUorQwLYVOet8EgHRHSxes2rhWccZxsNWA4WDqLe4yJ53/aVfvEtAXrC5sB/dEdyh0HaT7e3xZJGgTLqkY8tPZ1t96ftCU4WCGyqcmsey6AHjY4pyKzspibjtb+3mQiFmhHVY2qXJdNm/GK8QiM3KvDNV", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-03fc91cde78438694?role=publish_subscribe", "ResponseMetadata": {"RequestId": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:49:29 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n'
<i-01a919b33286168b1> PRE startup output received
<i-01a919b33286168b1> PRE Disabling Echo: b'stty -echo\n'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ '
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ s'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ '
<i-01a919b33286168b1> PRE Disabling Prompt: b"PS1='' ; printf '\\n%s\\n' 'tzLzeOyQfgbHdOairfXctIHvCE'\n"
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ \r\r\ntzLzeOyQfgbHdOairfXctIHvCE\r\r\n'
<i-01a919b33286168b1> PRE Terminal configured
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-03fc91cde78438694
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'printf '%s\n' 'unVADXWGDhKpmPYyJlyAahHsWK';
echo | sudo yum install -y awscli;
printf '\n%s\n%s\n' "$?" 'swsasimtXIvBgCtvgOQifPBsrV';
'
<i-01a919b33286168b1> EXEC stdout line: unVADXWGDhKpmPYyJlyAahHsWK
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: 0
<i-01a919b33286168b1> EXEC stdout line: swsasimtXIvBgCtvgOQifPBsrV
<i-01a919b33286168b1> POST_PROCESS: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do

0
<i-01a919b33286168b1> (0, 'Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r', '')
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-03fc91cde78438694
changed: [i-01a919b33286168b1] => {
    "changed": true,
    "rc": 0,
    "stderr": "",
    "stderr_lines": [],
    "stdout": "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r",
    "stdout_lines": [
        "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd",
        "",
        "",
        "",
        "amzn2-core                                               | 3.7 kB     00:00     ",
        "",
        "",
        "332 packages excluded due to repository priority protections",
        "",
        "",
        "Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version",
        "",
        "",
        "Nothing to do",
        "",
        ""
    ]
}
META: ran handlers
META: ran handlers

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
With the patch, it also works with gather_facts: true

Reviewed-by: Mark Chappell <None>
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 12, 2023
[PR #558/a5b44b8a backport][stable-4] fix ssm connection plugin fails at gathering facts

This is a backport of PR #558 as merged into main (a5b44b8).
SUMMARY
Apply diff proposed by @thomas-anderson-bsl #113 (comment)
Fix #113
Fix #1163
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Currently the example is failing on my Linux laptop
[vagrant@centos8 test]$ env |grep AWS
AWS_PROFILE=TKM_NOPROD
AWS_DEFAULT_REGION=eu-west-3
AWS_SDK_LOAD_CONFIG=1
[vagrant@centos8 test]$ aws sts get-caller-identity
{
    "UserId": "AROAQIIBQ3JCUSOU4JWCK:A512753",
    "Account": "017719941701",
    "Arn": "arn:aws:sts::017719941701:assumed-role/SysAdmin/A512753"
}
[vagrant@centos8 test]$ cat linux.yaml
- name: install aws-cli
  hosts: all
  gather_facts: false
  vars:
    ansible_connection: aws_ssm
    ansible_aws_ssm_bucket_name: tkm-exported-logs
    ansible_aws_ssm_region: eu-west-3
  tasks:
  - name: aws-cli
    raw: yum install -y awscli
    tags: aws-cli
[vagrant@centos8 test]$ cat aws_ec2.yml
plugin: aws_ec2
regions:
    - eu-west-3
hostnames:
    - instance-id
filters:
    tag:SSMTag: ssmlinux
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
redirecting (type: connection) ansible.builtin.aws_ssm to community.aws.aws_ssm
Loading collection community.aws from /home/vagrant/.local/lib/python3.6/site-packages/ansible_collections/community/aws
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0c292c1774b397c6f", "TokenValue": "AAEAAf79ujbqpQGYfHpLaJiTOlhUExBJDOkiLd/Fbq/alKF7AAAAAGCJEg4Fl3ljDMM9XwWJvAyTVsF3XwDlkJzbk4+c2802jl7gIIIODbDpCdsh9YRRLe5zIb1eXcZCTAquivDmzKpNp46ZxxRg/8UK/y5zeq8SvB58Fv8ir91F9LfxQD/hjVYOXKbU6MTjBeL7/JLCrWio5jV55NjXV1PMFWVVbfYvR+lesRhPKVhFf6bO4quyCTL+bmEDVAmCJnQX52KwBSqJhKArWUjAsmCfVj/YqaPLt1xmcR+CMlwO/x1VZPm6n2BBpFRr856bxsmVdEBOl/ckwsOK9k3JrTGQQuGxAVplO5rKlynBD15h2J4/CX1f2RiPOQghLyLSOUaSMA/o0MJMFkD7vMztgswj91lTqJKEu5O5fV1/3s1FnqRrXfFV6/+tcECoaDPxqbPvBiouN+5HHw4S", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0c292c1774b397c6f?role=publish_subscribe", "ResponseMetadata": {"RequestId": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:43:10 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "cd5a7d6a-406c-4a7b-9840-d74ce2a7db09"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo MjGohIiJUEeYoYWfZIfzrUfbLg
sudo yum install -y awscli
echo $'\n'$?
echo YoJSNqxmpcVfcJGJRJVfIteacP
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ MjGohIiJUEeYoYWfZIfzrUfbLg
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 57
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 0, cmd (yum install -y awscli...), pausing for 0 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0c292c1774b397c6f
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-0d6533239e4db8272", "TokenValue": "AAEAAcua+Crf0t+FmSNgvZSpxTvDQksaWVQiDjJ96ZmNStp0AAAAAGCJEkzdO6ZTkt7WRjUVePEQ7dys7SUGc/Ys8sPyn9r/gKqfi9g84j8uc6HaLKbB/jmrdVSdGMBVNvDEZtgeSpJMSRqZ/jPjB9jW0RHXCia8161lzpG6mnACyoL/bt6l1zpXA98sa4NFbaBRATXP+Rwd+gNONSn40kLYWegp/hvnsCgRsE70FfSrH+9NNsCpNvMli1TexqTuoQB1xz7MUnsMEwc/kkHM8NDcpEH+AGbNbVlSy3pLVe2EPS0ps2ElPp9WKpMrkywhN2LZT510TgRK6UoS23QBp2ZxqNPZLgK/qZh91M++pXYX/kBX5ACpOdBSccyMyHMN+aO//690zfC7Glk6t+i68R9odMFesPrDGPeWvhfZvtEuxW6TIOYLVqNOG7xR6/ilcGir7wrHNLvAmw4M", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-0d6533239e4db8272?role=publish_subscribe", "ResponseMetadata": {"RequestId": "48b9d452-99da-4b4d-9e30-148c4648760e", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:44:12 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "48b9d452-99da-4b4d-9e30-148c4648760e"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo AhNjLyNqKvKkPpDrBmFRWXQhYa
sudo yum install -y awscli
echo $'\n'$?
echo JuLdCBzespYaUSOaucFXezVwIt
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-0d6533239e4db8272
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ AhNjLyNqKvKkPpDrBmFRWXQhYa
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 1, cmd (yum install -y awscli...), pausing for 1 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-0d6533239e4db8272
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-09a773809c4290ba8", "TokenValue": "AAEAAY8euMXFMJqb6NktLar2duBd+N19wyEaDkoCkanNHU2RAAAAAGCJEoofW/XfRQ9bW2MlXFDd2V+3X2Dg9t1qHGvHkz8Ms1kHMZVNHAq4vk6YnulLLJmDf8GuBAbm1UpguJLbtdI1/dmWMXCSAHmAKwdCchds+eP4a0kBNWNCWRpa4g5igD6t+gwJNqtYFgfofbUJ1tPYenBUHtP/iYaWloP9NKXMDlcxB80mIc0jhWdK7IM+ohztD4HHWz9YLjw/yTrnUjTVMoLgoVAYp+42knhG5DYxXW6l5R6j2KUdGCgCsPmiQog9rZnpG1FR9Tr3+EpuEQhxZ4jRQA7Oez12KE1TMCcp5y22pg1i2tZ5bSu+NreIBmorVTay0RSoGtVCIGvcFs0T3UIQZQtlGwNhwpbOFqyT50d6N99zw7chzv5ORi3ilmweSIEqbUFTaCfCGxy7bOX+br5z", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-09a773809c4290ba8?role=publish_subscribe", "ResponseMetadata": {"RequestId": "6f105bd2-61c4-49b3-92b5-64b71149161d", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:45:14 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "6f105bd2-61c4-49b3-92b5-64b71149161d"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo fxUMwVtRygloIfujoykKZqsRYQ
sudo yum install -y awscli
echo $'\n'$?
echo meoFrFEeqnsFelOUcbgYMqWcqf
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-09a773809c4290ba8
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ fxUMwVtRygloIfujoykKZqsRYQ
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 58
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> ssm_retry: attempt: 2, cmd (yum install -y awscli...), pausing for 3 seconds
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-09a773809c4290ba8
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-04ce28f1ed0a9b2cc", "TokenValue": "AAEAAWShVQvs4lr+jZzebJuPI/kjqeHN9aRbG8Ga+dDyG92JAAAAAGCJEsu8ji1RBCTYUF6gZuRvoNRCynBSdcj5DEXOx/aGcIvd9dhQ35CL3yqd6vc2SG3CfGuVDrzaPjXdqbSpK8vYeC8T6o1iqCQQZTWRjx3hv1JPNcIvqKToXnVNYEehyuqL9AiEwjsp4BKsj+1GyZaONSEhu3hGv7CaU0lLwsZSeLNx/gUo48QKJJdfUFhAfElnlyt/bLgAFNokPWfhJo9C8eJaGUbPjGx5q5fFajpbCt56XE6bMqdvDkQq0rL0CCVOa8OwcXrq1cixwj8zyVJRk4r1xFaxVJUrNSiZjBef8XnuIJSwJGS4rqW3xj7MAcN+fP37cwsvRDXzaJiaNIQixd4BMUJT9DKBTnt5k8CKlkig/1CkLiqRfpTt/1dDrk3ijIn+WmijmUIGzXGTASXf4NL4", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-04ce28f1ed0a9b2cc?role=publish_subscribe", "ResponseMetadata": {"RequestId": "079764cf-ef62-4378-a6a7-c1aa982b2175", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:46:19 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "079764cf-ef62-4378-a6a7-c1aa982b2175"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'echo mYEabajpUREmWopOVdtXWVjhjA
sudo yum install -y awscli
echo $'\n'$?
echo HUOIrDSkTqNbXtGnpsfqUWmKse
'
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: Starting session with SessionId: A512753-04ce28f1ed0a9b2cc
<i-01a919b33286168b1> EXEC remaining: 60
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ stty -echo
<i-01a919b33286168b1> EXEC stdout line: sh-4.2$ mYEabajpUREmWopOVdtXWVjhjA
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC remaining: 56
<i-01a919b33286168b1> EXEC remaining: 55
<i-01a919b33286168b1> EXEC remaining: 54
<i-01a919b33286168b1> EXEC remaining: 53
<i-01a919b33286168b1> EXEC remaining: 52
<i-01a919b33286168b1> EXEC remaining: 51
<i-01a919b33286168b1> EXEC remaining: 50
<i-01a919b33286168b1> EXEC remaining: 49
<i-01a919b33286168b1> EXEC remaining: 48
<i-01a919b33286168b1> EXEC remaining: 47
<i-01a919b33286168b1> EXEC remaining: 46
<i-01a919b33286168b1> EXEC remaining: 45
<i-01a919b33286168b1> EXEC remaining: 44
<i-01a919b33286168b1> EXEC remaining: 43
<i-01a919b33286168b1> EXEC remaining: 42
<i-01a919b33286168b1> EXEC remaining: 41
<i-01a919b33286168b1> EXEC remaining: 40
<i-01a919b33286168b1> EXEC remaining: 39
<i-01a919b33286168b1> EXEC remaining: 38
<i-01a919b33286168b1> EXEC remaining: 37
<i-01a919b33286168b1> EXEC remaining: 36
<i-01a919b33286168b1> EXEC remaining: 35
<i-01a919b33286168b1> EXEC remaining: 34
<i-01a919b33286168b1> EXEC remaining: 33
<i-01a919b33286168b1> EXEC remaining: 32
<i-01a919b33286168b1> EXEC remaining: 31
<i-01a919b33286168b1> EXEC remaining: 30
<i-01a919b33286168b1> EXEC remaining: 29
<i-01a919b33286168b1> EXEC remaining: 28
<i-01a919b33286168b1> EXEC remaining: 27
<i-01a919b33286168b1> EXEC remaining: 26
<i-01a919b33286168b1> EXEC remaining: 25
<i-01a919b33286168b1> EXEC remaining: 24
<i-01a919b33286168b1> EXEC remaining: 23
<i-01a919b33286168b1> EXEC remaining: 22
<i-01a919b33286168b1> EXEC remaining: 21
<i-01a919b33286168b1> EXEC remaining: 20
<i-01a919b33286168b1> EXEC remaining: 19
<i-01a919b33286168b1> EXEC remaining: 18
<i-01a919b33286168b1> EXEC remaining: 17
<i-01a919b33286168b1> EXEC remaining: 16
<i-01a919b33286168b1> EXEC remaining: 15
<i-01a919b33286168b1> EXEC remaining: 14
<i-01a919b33286168b1> EXEC remaining: 13
<i-01a919b33286168b1> EXEC remaining: 12
<i-01a919b33286168b1> EXEC remaining: 11
<i-01a919b33286168b1> EXEC remaining: 10
<i-01a919b33286168b1> EXEC remaining: 9
<i-01a919b33286168b1> EXEC remaining: 8
<i-01a919b33286168b1> EXEC remaining: 7
<i-01a919b33286168b1> EXEC remaining: 6
<i-01a919b33286168b1> EXEC remaining: 5
<i-01a919b33286168b1> EXEC remaining: 4
<i-01a919b33286168b1> EXEC remaining: 3
<i-01a919b33286168b1> EXEC remaining: 2
<i-01a919b33286168b1> EXEC remaining: 1
<i-01a919b33286168b1> EXEC timeout stdout: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-04ce28f1ed0a9b2cc
fatal: [i-01a919b33286168b1]: UNREACHABLE! => {
    "changed": false,
    "msg": "SSM exec_command timeout on host: i-01a919b33286168b1",
    "unreachable": true
}

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
When I apply the patch, it works well
[vagrant@centos8 test]$ ansible-playbook linux.yaml -i aws_ec2.yml -vvvv
ansible-playbook 2.10.5
  config file = /home/vagrant/.ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.6/site-packages/ansible
  executable location = /home/vagrant/.local/bin/ansible-playbook
  python version = 3.6.8 (default, Aug 24 2020, 17:57:11) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /home/vagrant/.ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
script declined parsing /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml as it did not pass its verify_file() method
redirecting (type: inventory) ansible.builtin.aws_ec2 to amazon.aws.aws_ec2
Loading collection amazon.aws from /home/vagrant/.ansible/collections/ansible_collections/amazon/aws
Parsed /tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml inventory source with auto plugin
Loading callback plugin default of type stdout, v2.0 from /home/vagrant/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: linux.yaml ***************************************************************************************************************************************************
Positional arguments: linux.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/tmp/ansible-ami/base_aws_configuration/test/aws_ec2.yml',)
forks: 5
1 plays in linux.yaml

PLAY [install aws-cli] *************************************************************************************************************************************************
META: ran handlers

TASK [aws-cli] *********************************************************************************************************************************************************
task path: /tmp/ansible-ami/base_aws_configuration/test/linux.yaml:9
<i-01a919b33286168b1> ESTABLISH SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> SSM COMMAND: ['/usr/local/bin/session-manager-plugin', '{"SessionId": "A512753-03fc91cde78438694", "TokenValue": "AAEAAW/9pxZQ5rD36JpYalo7sawVweoKITNNtI4392BVkuEDAAAAAGCJE4m7i9Fiy79NAlD8WLAXo1Ybury4avfnW75u3V57mFHcOLF/NHkGHVrg9CgaddaKEdq46EmXmpnqL4BJ/bUzE6sm8YpX/JyLmxnuBaOMMfTEpBdTmTdEjJfq3JeRG3ze4klZwUAO3Bkr6Y4PebzPDSsiC9cYa/vF7JKWS05BR80j0eX3JrI02NQs6Xl4R12D88l80kxvhorMtSwdSuwVrfDJtVSX0AgRpDgc3ZaeoZOl6INJSz1joXdykO6J6sFNUorQwLYVOet8EgHRHSxes2rhWccZxsNWA4WDqLe4yJ53/aVfvEtAXrC5sB/dEdyh0HaT7e3xZJGgTLqkY8tPZ1t96ftCU4WCGyqcmsey6AHjY4pyKzspibjtb+3mQiFmhHVY2qXJdNm/GK8QiM3KvDNV", "StreamUrl": "wss://ssmmessages.eu-west-3.amazonaws.com/v1/data-channel/A512753-03fc91cde78438694?role=publish_subscribe", "ResponseMetadata": {"RequestId": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7", "HTTPStatusCode": 200, "HTTPHeaders": {"server": "Server", "date": "Wed, 28 Apr 2021 07:49:29 GMT", "content-type": "application/x-amz-json-1.1", "content-length": "642", "connection": "keep-alive", "x-amzn-requestid": "ae9980f6-68e2-4724-9e9d-cd46030ff8a7"}, "RetryAttempts": 0}}', 'eu-west-3', 'StartSession', '', '{"Target": "i-01a919b33286168b1"}', 'https://ssm.eu-west-3.amazonaws.com']
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n'
<i-01a919b33286168b1> PRE startup output received
<i-01a919b33286168b1> PRE Disabling Echo: b'stty -echo\n'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ '
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ s'
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ '
<i-01a919b33286168b1> PRE Disabling Prompt: b"PS1='' ; printf '\\n%s\\n' 'tzLzeOyQfgbHdOairfXctIHvCE'\n"
<i-01a919b33286168b1> PRE stdout line: b'\r\nStarting session with SessionId: A512753-03fc91cde78438694\r\n\x1b[?1034hsh-4.2$ stty -echo\r\r\nsh-4.2$ \r\r\ntzLzeOyQfgbHdOairfXctIHvCE\r\r\n'
<i-01a919b33286168b1> PRE Terminal configured
<i-01a919b33286168b1> SSM CONNECTION ID: A512753-03fc91cde78438694
<i-01a919b33286168b1> EXEC yum install -y awscli
<i-01a919b33286168b1> _wrap_command: 'printf '%s\n' 'unVADXWGDhKpmPYyJlyAahHsWK';
echo | sudo yum install -y awscli;
printf '\n%s\n%s\n' "$?" 'swsasimtXIvBgCtvgOQifPBsrV';
'
<i-01a919b33286168b1> EXEC stdout line: unVADXWGDhKpmPYyJlyAahHsWK
<i-01a919b33286168b1> EXEC stdout line: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
<i-01a919b33286168b1> EXEC remaining: 59
<i-01a919b33286168b1> EXEC stdout line: 332 packages excluded due to repository priority protections
<i-01a919b33286168b1> EXEC stdout line: Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
<i-01a919b33286168b1> EXEC stdout line: Nothing to do
<i-01a919b33286168b1> EXEC stdout line:
<i-01a919b33286168b1> EXEC stdout line: 0
<i-01a919b33286168b1> EXEC stdout line: swsasimtXIvBgCtvgOQifPBsrV
<i-01a919b33286168b1> POST_PROCESS: Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                               | 3.7 kB     00:00
332 packages excluded due to repository priority protections
Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version
Nothing to do

0
<i-01a919b33286168b1> (0, 'Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r', '')
<i-01a919b33286168b1> CLOSING SSM CONNECTION TO: i-01a919b33286168b1
<i-01a919b33286168b1> TERMINATE SSM SESSION: A512753-03fc91cde78438694
changed: [i-01a919b33286168b1] => {
    "changed": true,
    "rc": 0,
    "stderr": "",
    "stderr_lines": [],
    "stdout": "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\r\r\n\ramzn2-core                                               | 3.7 kB     00:00     \r\r\r\n332 packages excluded due to repository priority protections\r\r\r\nPackage awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version\r\r\r\nNothing to do\r\r\r",
    "stdout_lines": [
        "Loaded plugins: extras_suggestions, langpacks, priorities, update-motd",
        "",
        "",
        "",
        "amzn2-core                                               | 3.7 kB     00:00     ",
        "",
        "",
        "332 packages excluded due to repository priority protections",
        "",
        "",
        "Package awscli-1.18.147-1.amzn2.0.1.noarch already installed and latest version",
        "",
        "",
        "Nothing to do",
        "",
        ""
    ]
}
META: ran handlers
META: ran handlers

PLAY RECAP *************************************************************************************************************************************************************
i-01a919b33286168b1        : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
With the patch, it also works with gather_facts: true

Reviewed-by: Mark Chappell <None>
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 12, 2023
aws_ssm - Rework (and enable) integration tests

Depends-On: #558
SUMMARY
aws_ssm tests have been broken for a while.  This should get initial integration tests up and running
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Notes:

Does not cover cross-geo S3 buckets (only one region in CI at the minute)
Does not cover encrypted buckets (missing permissions)

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
patchback bot pushed a commit that referenced this pull request Jan 12, 2023
aws_ssm - Rework (and enable) integration tests

Depends-On: #558
SUMMARY
aws_ssm tests have been broken for a while.  This should get initial integration tests up and running
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Notes:

Does not cover cross-geo S3 buckets (only one region in CI at the minute)
Does not cover encrypted buckets (missing permissions)

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
(cherry picked from commit e01ac08)
patchback bot pushed a commit that referenced this pull request Jan 12, 2023
aws_ssm - Rework (and enable) integration tests

Depends-On: #558
SUMMARY
aws_ssm tests have been broken for a while.  This should get initial integration tests up and running
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Notes:

Does not cover cross-geo S3 buckets (only one region in CI at the minute)
Does not cover encrypted buckets (missing permissions)

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Mark Chappell <None>
(cherry picked from commit e01ac08)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 12, 2023
[PR #1652/e01ac083 backport][stable-5] aws_ssm - Rework (and enable) integration tests

This is a backport of PR #1652 as merged into main (e01ac08).
Depends-On: #558
SUMMARY
aws_ssm tests have been broken for a while.  This should get initial integration tests up and running
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Notes:

Does not cover cross-geo S3 buckets (only one region in CI at the minute)
Does not cover encrypted buckets (missing permissions)

Reviewed-by: Markus Bergholz <[email protected]>
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 12, 2023
[PR #1652/e01ac083 backport][stable-4] aws_ssm - Rework (and enable) integration tests

This is a backport of PR #1652 as merged into main (e01ac08).
Depends-On: #558
SUMMARY
aws_ssm tests have been broken for a while.  This should get initial integration tests up and running
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
aws_ssm
ADDITIONAL INFORMATION
Notes:

Does not cover cross-geo S3 buckets (only one region in CI at the minute)
Does not cover encrypted buckets (missing permissions)

Reviewed-by: Markus Bergholz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-4 PR should be backported to the stable-4 branch backport-5 PR should be backported to the stable-5 branch bug This issue/PR relates to a bug community_review connection connection plugin mergeit Merge the PR (SoftwareFactory) new_contributor Help guide this first time contributor plugins plugin (any type) python3
Projects
None yet
5 participants