thanks, it worked as suggested,
now I am trying create an inventory file for production and staging as
suggested here in suggested here in article Static Groups of Dynamic Groups
<http://docs.ansible.com/ansible/intro_dynamic_inventory.html#static-groups-of-dynamic-groups>
production
[webservers]
"tag_environment_staging:&tag_stack_webserver"
staging
[webservers]
"tag_environment_production:&tag_stack_webserver"
but I am receiving error
Traceback (most recent call last):
File "/usr/local/bin/ansible-playbook", line 324, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/bin/ansible-playbook", line 157, in main
inventory = ansible.inventory.Inventory(options.inventory,
vault_password=vault_pass)
File "/Library/Python/2.7/site-packages/ansible/inventory/__init__.py",
line 128, in __ini
t__
self.parser = InventoryParser(filename=host_list)
File "/Library/Python/2.7/site-packages/ansible/inventory/ini.py", line
43, in __init__
self._parse()
File "/Library/Python/2.7/site-packages/ansible/inventory/ini.py", line
47, in _parse
self._parse_base_groups()
File "/Library/Python/2.7/site-packages/ansible/inventory/ini.py", line
140, in _parse_bas
e_groups
host = Host(name=hn, port=port)
File "/Library/Python/2.7/site-packages/ansible/inventory/host.py", line
32, in __init__
self.set_variable('ansible_ssh_port', int(port))
ValueError: invalid literal for int() with base 10: '&tag_stack_webserver'
On Wednesday, November 11, 2015 at 6:00:50 PM UTC-5, I like ansible wrote:
>
> thanks for the documentation about how to manage AWS ec2 dynamic
> inventory, in this example:
>
> http://docs.ansible.com/ansible/intro_dynamic_inventory.html#example-aws-ec2-external-inventory-script
>
> the doc is assuming that two separate accounts are used for dev vs
> production: hence different authentication used to connect.
> another common aws approach is to have one account but multiple VPC (prod
> / staging / dev) and using tags.
>
> would love to have some info written about this second approach one
> account with multiple VPCs
>
> been trying to experiment with stuff like:
>
> hosts: "tag_stack_webserver: &tag_environment_production"
>
> not sure if its the correct approach
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/494858fe-a3a8-4411-9d1e-5a6ece05138f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.