Skip to content
Permalink
Browse files
Better management of inventory to pick up tags
Added a meta task to rebuild inventory. This causes the ec2.py script to
be run again and pick up the tags for the recently provisioned ec2
instances, so that the tags can be used as variables later in
plays/tasks.
  • Loading branch information
skoranda committed Nov 9, 2019
1 parent 42233fb commit 00d0782b6cf1c7aaf35ea35c2fe709b5801231ac
Showing with 5 additions and 1 deletion.
  1. +1 −0 ec2.ini
  2. +4 −1 training_nodes.yml
@@ -118,6 +118,7 @@ cache_path = ~/.ansible/tmp
# seconds, a new API call will be made, and the cache file will be updated.
# To disable the cache, set this value to 0
#cache_max_age = 300
cache_max_age = 0

# Organize groups into a nested/hierarchy instead of a flat namespace.
nested_groups = False
@@ -236,8 +236,11 @@
overwrite: yes
wait: no
loop: "{{ training_nodes.results }}"

- name: Refresh inventory to pick up ec2 tags
meta: refresh_inventory

- hosts: ssh_training_node_hosts
- hosts: tag_role_comanage_registry
become: yes
gather_facts: True
strategy: free

0 comments on commit 00d0782

Please sign in to comment.