- name: hold openssh-client only if OS is 12.04
shell: echo "openssh-client hold" | sudo dpkg --set-selections
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'precise'
- name: hold openssh-server only if OS is 12.04
shell: echo "openssh-server hold" | sudo dpkg --set-selections
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'precise'
- name: update and upgrade a server
apt: upgrade=safe update_cache=yes
sudo: yes
The package is "held" it dpkg.
openssh-client hold
openssh-server hold
The state of apt before ansible:
The following packages have been kept back:
linux-headers-generic linux-headers-virtual linux-image-virtual linux-virtual openssh-client openssh-server
After deploy:
The following packages have been kept back:
linux-headers-generic linux-headers-virtual linux-image-virtual linux-virtual
I would have thought, using the safe-upgrade should have stopped openssh being upgraded.
Is this a bug, or am I missing something?
Thanks
Ben