Thanks for you suggestion but I just get this when use you way

```
   - name: upgrade docker-engine
     apt:
         name: docker-engine
         only_upgrade: docker-engine
#         state: latest
```

```
TASK [upgrade docker-engine] 
***************************************************
ok: [xx.xx.xx.xx]

```

and if I add state:latest, I just think only_upgrade is not work , because 
I also can install the latest version without only_upgrade 


在 2016年7月21日星期四 UTC+8下午10:44:46,Kai Stian Olstad写道:
>
> On 21. juli 2016 03:44, richar...@gmail.com <javascript:> wrote: 
> > 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. 
>
> The documentation also say the default value is false, so this option 
> can only be true or false. 
>
>
> >     - name: upgrade docker-engine 
> >       apt: 
> >           only_upgrade: docker-engine 
>
> This should be 
> - name: upgrade docker-engine 
>    apt: 
>      name: docker-engine 
>      only_upgrade: true 
>
> I also think you need to add state: latest to have it upgrade the package. 
>
> -- 
> Kai Stian Olstad 
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f07a54b2-05b1-412a-baec-742593c43a06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to