community.aws icon indicating copy to clipboard operation
community.aws copied to clipboard

aws_ssm - Fix ssm_timeout wording in documentation

Open kindlehl opened this issue 2 years ago • 3 comments

Summary

The docs make the timeout seem as if the plugin checks the time it takes to establish a connection, but the timeout setting on this plugin also affects the duration of the command. So if you were to try to run this:

- name: sleep
  command: sleep 61
  vars:
    ansible_aws_ssm_timeout: 60

You would get a timeout error.

Issue Type

Documentation Report

Component Name

aws_ssm.py

Ansible Version

$ ansible --version
2.10.10

Collection Versions

$ ansible-galaxy collection list
...
community.aws                 1.5.0

Configuration

$ ansible-config dump --only-changed

OS / Environment

CentOS 7

Additional Information

This wording change would help new users of the plugin understand timeout errors. It is not always an error connecting to the target servers, the command could just be hanging.

Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

kindlehl avatar Jul 30 '21 00:07 kindlehl

Files identified in the description:

  • [plugins/modules/aws_kms.py](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/aws_kms.py)
  • [plugins/modules/aws_ssm_parameter_store.py](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/aws_ssm_parameter_store.py)

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Jul 30 '21 00:07 ansibullbot

cc @116davinder @jillr @markuman @mikedlr @nathanwebsterdotme @ozbillwang @s-hertel @tremble @wimnat click here for bot help

ansibullbot avatar Jul 30 '21 00:07 ansibullbot

@kindlehl, I am unable to reproduce with the new version of ansible.

dpal@DESKTOP-CR9Q1AE:~$ ansible --version
ansible [core 2.11.3]
  config file = None
  configured module search path = ['/home/dpal/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  ansible collection location = /home/dpal/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.8.10 (default, Jun  2 2021, 10:49:15) [GCC 9.4.0]
  jinja version = 2.10.1
  libyaml = True
dpal@DESKTOP-CR9Q1AE:~$ cat test.yaml
---
- hosts: localhost
  become: false
  gather_facts: false
  tasks:
    - name: sleep
      command: sleep 5
      vars:
        ansible_aws_ssm_timeout: 4
dpal@DESKTOP-CR9Q1AE:~$ ansible-playbook test.yaml  -v
PLAY [localhost] *******************************************************************************************************

TASK [sleep] ***********************************************************************************************************
changed: [localhost] => {"changed": true, "cmd": ["sleep", "5"], "delta": "0:00:05.001127", "end": "2021-09-05 00:45:32.316391", "rc": 0, "start": "2021-09-05 00:45:27.315264", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

PLAY RECAP *************************************************************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

if possible, can provide more context on what host you are running why would you even set ansible_aws_ssm_timeout for command module and -vvvv output of your playbook so at least I can understand what is going on?

116davinder avatar Sep 04 '21 21:09 116davinder