rht-labs / labs-ci-cd

👻UNMAINTAINED - A collection of Red Hat Open Innovation Labs CI/CD components
Apache License 2.0
101 stars 70 forks source link

filter_tags doesn't seem to work #238

Closed rdebeasi closed 5 years ago

rdebeasi commented 5 years ago

This step from the README doesn't seem to work as expected:

here is an example that runs the tags that provision projects, ci, and jenkins objects: [...]

ansible-playbook  apply.yml \
   -e target=tools \
   -e="filter_tags=jenkins,ci,projects"

When I run this command, the entire playbook runs. (I noticed this while trying to work around #228. The command above still runs Nexus config, rather than running only Jenkins, CI, and project creation.)

This narrower command also triggers Nexus config:

ansible-playbook  apply.yml -e target=tools -e="filter_tags=jenkins,projects"

There doesn't appear to be a filter_tags variable in Labs CI/CD. Does this feature need to be implemented? Or, should we use Ansible's --tags parameter? This parameter doesn't appear to work as I'd expect, but maybe I'm doing something wrong.

$ ansible-playbook  apply.yml -e target=tools --tags="jenkins,projects"

PLAY [Deploy tools] **************************************************************

TASK [Gathering Facts] ***********************************************************
ok: [ci-cd-tooling]

PLAY RECAP ***********************************************************************
ci-cd-tooling              : ok=1    changed=0    unreachable=0    failed=0

Thanks! :smile:

springdo commented 5 years ago

@rdebeasi you've got a typo issue. Remove the equals sign on your second -e for the filter tags

-e "filter_tags=jenkins,projects"

rdebeasi commented 5 years ago

Whoops, so I do. Thanks for catching that! Removing the equals sign fixes the problem.

That typo actually appears in the readme - that's how I ended up with it in the first place. I'll file a PR to fix that typo.