--tags tag1 AND tag2, possible?

73 views
Skip to first unread message

nusenu

unread,
Jun 4, 2015, 3:56:14 PM6/4/15
to ansible...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

I have a role which supports multiple platforms (Debian, RHEL,
FreeBSD, OpenBSD). I use 'when: ansible_pkg_mgr == ...' a lot to
autodetect, but that results in a lot of skipping... so I thought I
might use tags in addition, so users can choose to specifically select
only their platform to speedup playbook runs.

I would have OS specific tags in mind (debian, freebsd, ...) and task
oriented tags (install, configure, ...).

While playing with it, I noticed that '--tags debian,install' runs
tasks that are tagged as 'debian' OR 'install' (which includes tasks
tagged as freebsd,install -> results in lot of skipping again), is
there a way to say run only 'debian' *AND* 'install' tagged tasks?

thanks!
nusenu
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJVcK1HAAoJEFv7XvVCELh0sZwP/j+/YvS3+jXD3OPGFZNTwdSp
7EvZ15583hP5/fCm1I30ZlTBl31K4xVYiOA+AKZ7LAqNLnxT4btvPf99O/bUJ4tp
nznR9fkOYC16FU9lFbrMa4LYG9ry189zZPWi1XlsQorNYa6erAS9N0EWmKcQfVtX
GIOx575T/4z2qvfhOaStKahigEOUa4EspE66Eg7WoeC9gGRWC6URlx+HmDEuAL9/
VtxNM9rFyiTshHZi2J9ERY2Cn/F/k5xnEhTD23Wk5+I76CR6B72fPBs0v6Ehm4c4
SrWFgdzgWZy028nsWXjyOa6lnvXDrQLJhSmvynsst7jCuMK/PPvMZRh5pFR7Lc+Q
ajx1VNxfgWO3c8qN/o13jvnkre3hEFnHhO658NEHpxM7U4W1UTkCIgd8MhknJVxr
KDF/RxanQ3v69S54EzNDIPvQxHRXapz3bDTFPI4hynUqMR1C06FbhLhut9tokE9w
tatUGma7Ky2vo/B+Dcqzi31Z02Vup7pdDidUBSDJcR//h6LQojU4Ew9/ZZ4tSinO
f959P7zbqpLY9pzb0zfelK5tQ4JIuXBKqm2JoLhlS5VRnhU/iGtXS0mKm+j+AUdQ
yffD/xukj5NqZYY/szQtSYFJTqs66vBdaQ4+jwsQMdehyR37aw0jvPNVBnT9A6gF
BkXXJ0tjtYAvyIPmE2dS
=3OtX
-----END PGP SIGNATURE-----

Brian Coca

unread,
Jun 4, 2015, 4:01:24 PM6/4/15
to ansible...@googlegroups.com
not currently, a feature request we have is that tags get 'host expressions', so this would look like;

tag1:&tag2

but there is currently no code that does this
--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5570AD47.7090808%40openmailbox.org.
For more options, visit https://groups.google.com/d/optout.


--
Brian Coca

nusenu

unread,
Jun 4, 2015, 4:27:46 PM6/4/15
to ansible...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512



Brian Coca:
> not currently, a feature request we have is that tags get 'host
> expressions', so this would look like;
>
> tag1:&tag2
>
> but there is currently no code that does this

thanks for the prompt reply.

I tried to find that feature request, via:

https://github.com/ansible/ansible/issues?utf8=%E2%9C%93&q=is%3Aopen+label%3Afeature_idea+tags

but did not find it. Would you point me to it?

thanks
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJVcLSwAAoJEFv7XvVCELh0Gm0QAKtjqE0mUhWaPRLrgqVXr0Q1
XPcWqqp1cHMh3+CHkoC1Er9lAdqqoPd4qskIGkRwZwdIezGLYMtUiOo+Wnr/eHqa
4IUq9G3qhZGr91GRP+eLoPgFP69/cQJBYOFpdncpZ6PQEktUFeQNGJUj6RuUAP7b
2JuytNpiTb5cfQuJYv0fNulPssn2A1wFgVcihf99nZlzt/B3OaUqj/Ajw87gJPBm
dF0Yx8AfnsTsR9rqPX1IYurSdwJuqADbZxRwdOtn8k+rpXuFgkZGGZutF8U8M92d
ygZaz2bTZ3BbxVSxIblk9LxqZtcEOofTnHw8flssDX2Ng3VMI5JRGY0Ypp3V2jb1
Zq2ofELpNoB2l9579cnw6sfDLvJvcPX4hX/v4gOnndY1RYGb99kzVF4mVymWgXQV
LMx+zauKMC7DEYeM6KmGw+rJQPchU3Z9vV7dbZoP+dGhY4ygZj+gXp6Ta359IDC8
7Tvpp5JT6qhFWxqa1mUep2iuJTnOLSU0FuzUcft9OKMBo6wyAP7tHeqwhtySqc+m
m80tB9uj/SvNJo1ymyfBGb9FgS+oTZRDlK+3DK4ziJynHndtQPW4U8Y8JkuOnhBD
CwTDBYrdlewbBZHdFtf9QpK4Hzf2v9xn4ux/ftqZhzMwPsSUpvlGzSPjgksoL8T5
lrzPe5MJ7VVch78bUlV2
=5Nk+
-----END PGP SIGNATURE-----

Brian Coca

unread,
Jun 5, 2015, 11:03:34 AM6/5/15
to ansible...@googlegroups.com
I was not thinking of a specific ticket, but there should be many
instances of this being requested via the maliing lists and IRC and
even as comments in other tag related tickets.




--
Brian Coca

nusenu

unread,
Jun 5, 2015, 3:39:43 PM6/5/15
to ansible...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512



Brian Coca:
> I was not thinking of a specific ticket, but there should be many
> instances of this being requested via the maliing lists and IRC
> and even as comments in other tag related tickets.

ok sounds like one should create an issue for it:

https://github.com/ansible/ansible/issues/11185
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJVcfroAAoJEFv7XvVCELh0TEMQAIdvmg/NbDyjhziy56r61UUY
iFikN4mk2JxIsFvEI3F2wfrWGAs1hvlLWpNZO0fYjh9UtvlJH+ZcN5+OOsy9L+E7
e61GB6gcX/h4/SDvU3F8khJIat/tq9Dg7TRlA9wKrUwQI0MBxXUhOkYeow1q0n1h
psYbQmhWMC5d8U5xKaI649ACtI2qm+14Cgp6/dySFJ2JQch+si7KauvX/gNKVz89
6gNgQjqiu+pu4YMDe93wv8O4UKEblHCveQMpD07DKHnJqVbs9Lqf/+JjJadEh4FZ
x2CuwDgj0Trn35q70jYESUQcu0zT92wv65ud2gq8RZurlh+Npo7SfPrr87uHs92R
N3pa9YQZu+s4egcmK2/XzGA8APjhp8+pkOrYL+xCzcmY3MG9xUKmeixIWSH8oEZu
mbN13XouaK3Oh2dXaG6mF6ydmeDX1ZNNGgaEvORahhiwupptXB0oD31GWi+WUE6v
dM0rgKiX+cDmEKBEQdAwWcqXBFoqRFoTBFu8J8GyUEXZMyXRo+UEzBNwPQTI6ao4
eQNED2LySqQg0F1f7BKGLfyKIComdqyu+h38vmlaIvVGgNkMS+Wu+gWtu5CNhBEf
x4Z25aKT/fM4pxlH96as2GBP0cz8a36XI/GH0DgVg/Qv7z/DHQESjMNp4kFuu/fT
KdBXkNyMeR0YU/3fwGBC
=n1aO
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages