community.aws
community.aws copied to clipboard
aws ssm connection document for file tranfser
Summary
i was reading documentation of collection community.aws.aws_ssm. there are lot of examples written but i do not see any example what is the syntax to tranfser file using ssm and run script file on remote.
Issue Type
Documentation Report
Component Name
community.aws.aws_ssm
Ansible Version
$ ansible --version
ansible [core 2.11.9]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
ansible collection location = /etc/ansible/collections:/root/.ansible/collections:/usr/share/ansible/collections
executable location = /bin/ansible
python version = 3.6.8 (default, Sep 10 2021, 09:13:53) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
jinja version = 2.10.1
libyaml = True```
### Collection Versions
```console (paste below)
$ ansible-galaxy collection list
/etc/ansible/collections/ansible_collections
Collection Version
amazon.aws 3.1.1 community.aws 3.1.0
/root/.ansible/collections/ansible_collections
Collection Version
amazon.aws 3.0.0 community.aws 3.0.1
Configuration
$ ansible-config dump --only-changed
OS / Environment
Centos8
Additional Information
No response
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
Files identified in the description: None
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
There are two parts.
There's the aws_ssm
connection plugin, which connects Ansible to the host over SSM.
Once you've done that, the rest is just like normal Ansible (e.g. as if you were using SSH). Are you familiar with how to copy files and run commands using Ansible over SSH?
To copy files, use the copy
module. To run raw bash/shell commands, use shell
or command
.