Using the version of a package that has been installed

6 views
Skip to first unread message

Johannes Kastl

unread,
Feb 18, 2016, 1:49:29 PM2/18/16
to ansible...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone,

say, we have a package, that different systems have in different
versions. Depending on the version, that has been installed in the
playbook previously, I would like to deploy a different version of
the config files.

I think this is possible with ansible, but what is the most elegant,
less errorprone way to do so?

Registering a variable during installation?
Gathering facts after installation of the package seems rather overkil
l.
Issuing 'dpkg -l|grep xyz' or 'rpm -qa|grep xyz' or similar surely
works, but is error prone and needs a lot of "when:
ansible_distribution == ..".

Thanks for any hints!

Johannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAlbGEiEACgkQzi3gQ/xETbJJXQCfTBJqS0tkKiJy2TJCqDFuJ3Y6
X2sAmQG1Xon/K41eK4R9Euy1N7UQ6vK5
=mcr2
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages