Skip to content

Resolve the _ and - problem with tags #79

@gavD

Description

@gavD

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions