Hello,
Having either apt: only_upgrade=docker-engine in my playbook or running it
on the command line as ansible all --sudo -m apt -a
'only_upgrade=docker-engine' fails with
```
xx.xxx.xx.xxx | FAILED! => {
"changed": false,
"failed": true,
"msg": "Boolean docker-engine not in either boolean list"
}
```
In the document
only_upgrade(added in 2.1)
Only install/upgrade a package if it is already installed.
my local ansible version is
```
ansible 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/usr/share/ansible']
```
my host docker version is 1.11.0,I just want to only upgrade this package
docker-engine to 1.11.2
my playbook is here
```
---
- hosts: xxxx
sudo: yes
vars:
apt_packages:
- apt-transport-https
- ca-certificates
tasks:
- name: add CA certificates are installed.
apt:
name: "{{ item }}"
update_cache: yes
with_items: apt_packages
- name: add apt-key of dockers
apt_key:
keyserver: p80.pool.sks-keyservers.net
id: 58118E89F3A912897C070ADBF76221572C52609D
- name: modify /etc/apt/sources.list.d/docker.list
replace:
dest: /etc/apt/sources.list.d/docker.list
regexp: '^deb http'
replace: "deb https"
- name: upgrade docker-engine
apt:
only_upgrade: docker-engine
```
Thanks!
--
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/9d5ba58c-298d-409c-bd8e-d8eaba20bb43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.