Installation¶
We can install the AWS Ansible Collection in two different ways, depending on the system we use. On Red Hat Enterprise Linux (RHEL) or CentOS, we can add a new RPM repository and install packages using yum or dnf. On other distributions, we can use ansible-galaxy command for installation.
We need to install the boto3 python package separately in both cases.
Note
To use the AWS Ansible Collection, we need to have Ansible 2.9+ installed. Previous Ansible versions do not support Ansible Collections well enough to be usable.
Installing collection from a RPM¶
Instructions for installing AWS Ansible Collection from installer packages for RHEL/Centos are available upon registration. These packages are provided under these Terms and Conditions.
Installing collection using ansible-galaxy¶
If we are not using any of the supported distributions, we can install the AWS Ansible Collection by running:
$ ansible-galaxy collection install steampunk.aws
We can also install the enterprise variant this way by running:
$ ansible-galaxy collection install <insert-your-download-url-here>
Installing the boto3 python package¶
In order to be able to use all of the AWS Ansible Collection features, we also need to install boto3 python package. We can do this using the following command:
$ pip3 install --user -U boto3
Now we can use all of the AWS features that collection supports.
Verifying the installation¶
We can check our installation by running the following command:
$ ansible-doc steampunk.aws.ec2_instance
If the previous command printed out the API documentation, we are all set.