mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update intro_dynamic_inventory.rst
Minor edits for readability.
This commit is contained in:
parent
2de3a5d849
commit
75459fb688
1 changed files with 5 additions and 3 deletions
|
@ -133,10 +133,12 @@ If you use Boto profiles to manage multiple AWS accounts, you can pass ``--profi
|
|||
aws_access_key_id = <prod access key>
|
||||
aws_secret_access_key = <prod secret key>
|
||||
|
||||
You can then run ``ec2.py --profile prod`` to get the inventory for the prod account, this option is not supported by ``ansible-playbook`` though.
|
||||
But you can use the ``AWS_PROFILE`` variable - e.g. ``AWS_PROFILE=prod ansible-playbook -i ec2.py myplaybook.yml``
|
||||
You can then run ``ec2.py --profile prod`` to get the inventory for the prod account, although this option is not supported by ``ansible-playbook``.
|
||||
You can also use the ``AWS_PROFILE`` variable - for example: ``AWS_PROFILE=prod ansible-playbook -i ec2.py myplaybook.yml``
|
||||
|
||||
Since each region requires its own API call, if you are only using a small set of regions, feel free to edit ``ec2.ini`` and list only the regions you are interested in. There are other config options in ``ec2.ini`` including cache control, and destination variables. The ``ec2.ini`` file presumably defaults to **all the features** which for many admins is probably appropriate. If you have limited scope of what your ``IAM`` user is capable of, i.e, you would not have access to certain component, just comment/toggle the appropriate lines. For example,if you don't have ``RDS`` and ``elasticache`` access toggle to ``False`` ::
|
||||
Since each region requires its own API call, if you are only using a small set of regions, you can edit the``ec2.ini`` file and comment out the regions you are not using.
|
||||
|
||||
There are other config options in ``ec2.ini``, including cache control and destination variables. By default, the ``ec2.ini`` file is configured for **all Amazon cloud services**, but you can comment out any features that aren't applicable. For example, if you don't have ``RDS`` or ``elasticache``, you can set them to ``False`` ::
|
||||
|
||||
[ec2]
|
||||
...
|
||||
|
|
Loading…
Reference in a new issue