Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve the _ and - problem with tags #79

Open
gavD opened this issue Jun 22, 2016 · 0 comments
Open

Resolve the _ and - problem with tags #79

gavD opened this issue Jun 22, 2016 · 0 comments

Comments

@gavD
Copy link
Contributor

gavD commented Jun 22, 2016

When you create a tag like:

Environment: hello-world

that's effectively tag_Environment_hello-world. the EC2 inventory script does not play nice with this because the - is represented as a _:

...
"tag_Environment_hello_world": [
"54.165.138.95",
"54.227.13.66"
],


Therefore, the generated provision.sh script needs to change to replace `-` characters with `_` characters:

```bash
# OLD version
ansible-playbook tag-old-nodes.yaml --limit tag_Environment_hello-world || true
ansible-playbook destroy-old-nodes.yaml --limit tag_oldhello-world_True || true

# NEW version
ansible-playbook tag-old-nodes.yaml --limit tag_Environment_hello_world || true
ansible-playbook destroy-old-nodes.yaml --limit tag_oldhello_world_True || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant