Hello,
in my ansible playbook I want to ensure a specific version of a package is
installed, even if that would mean downgrading it. I know that I can
specify version together with package name, like this: haproxy=1.4.24-2.
However, this is not enough in case of downgrading: this playbook
- hosts: all
tasks:
- name: install haproxy
apt:
name: haproxy=1.4.24-2
sudo: yes
will fail if a newer version of haproxy is installed. I know that I can
use "force" attribute, but that would also disable some useful security
checks - for example, with force=yes Ansible would install a package even
if it couldn't be authenticated. Is there a better way?
I thought that "dpkg_options" may help me, but this playbook also fails on
downgrade:
- hosts: all
tasks:
- name: install haproxy
apt:
name: haproxy=1.4.24-2
dpkg_options: force-downgrade
sudo: yes
Is this a bug?
Maybe I should approach this problem in an altogether different way?
best,
Jan
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/67ae437b-cd6d-4b40-8821-1608c5ce4258%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.