Re: [ansible-project] modules apt: only_upgrade fail
Woo!! Thanks a lot 在 2016年7月29日星期五 UTC+8上午1:15:48,Kai Stian Olstad写道: > > On 28. juli 2016 11:00, richar...@gmail.com wrote: > > Thank you very much , > > > > I know it right now ,thank you very much > > > > you get the stdout message used register and debug ?? > > No, I use a callback plugin that give a more human readable output. > The one I use is this one > https://github.com/n0ts/ansible-human_log > > -- > 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/d0637b3d-0cbf-4f55-8f4f-ea844f683303%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] modules apt: only_upgrade fail
On 28. juli 2016 11:00, richard934...@gmail.com wrote: Thank you very much , I know it right now ,thank you very much you get the stdout message used register and debug ?? No, I use a callback plugin that give a more human readable output. The one I use is this one https://github.com/n0ts/ansible-human_log -- 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/5db5c6fb-18d2-94a1-624e-083a6455865d%40olstad.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] modules apt: only_upgrade fail
Thank you very much , I know it right now ,thank you very much you get the stdout message used register and debug ?? 在 2016年7月28日星期四 UTC+8下午2:58:23,Kai Stian Olstad写道: > > On 28. juli 2016 07:54, richar...@gmail.com wrote: > > 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 > > I'm not sure I understand you, my test of only_upgrade > > $ dpkg -l htop > dpkg-query: no packages found matching htop > > I run this task: > - name: upgrade if exist >apt: > name=htop > state=latest > only_upgrade=true > > The output: > TASK [upgrade if exist] > > changed: [localhost] > > stdout: Reading package lists... > Building dependency tree... > Reading state information... > Skipping htop, it is not installed and only upgrades are requested. > 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. > > As you see, nothing was installed and this confirms it > > $ dpkg -l htop > dpkg-query: no packages found matching htop > > So the only_upgrade is working in Ansible 2.1.0. > The apt module is using the apt-get command and only_upgrade=true adds > --only-upgrade as an option to apt-get. > > -- > 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/e5f967a0-501b-4818-8b46-0ae041b913a3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] modules apt: only_upgrade fail
On 28. juli 2016 07:54, richard934...@gmail.com wrote: 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 I'm not sure I understand you, my test of only_upgrade $ dpkg -l htop dpkg-query: no packages found matching htop I run this task: - name: upgrade if exist apt: name=htop state=latest only_upgrade=true The output: TASK [upgrade if exist] changed: [localhost] stdout: Reading package lists... Building dependency tree... Reading state information... Skipping htop, it is not installed and only upgrades are requested. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. As you see, nothing was installed and this confirms it $ dpkg -l htop dpkg-query: no packages found matching htop So the only_upgrade is working in Ansible 2.1.0. The apt module is using the apt-get command and only_upgrade=true adds --only-upgrade as an option to apt-get. -- 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/312ce730-85ab-04ca-0b05-91b4226c9639%40olstad.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] modules apt: only_upgrade fail
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 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.
Re: [ansible-project] modules apt: only_upgrade fail
I just think this way is reinstall docker-engie to latest when you ues name and state=lastest it's different to upgrade this procedure 在 2016年7月21日星期四 UTC+8下午10:44:46,Kai Stian Olstad写道: > > On 21. juli 2016 03:44, richar...@gmail.com 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/c30b9614-0482-47ae-be12-f765d4a1f4b1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] modules apt: only_upgrade fail
On 21. juli 2016 03:44, richard934...@gmail.com 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/5790DFCE.9060701%40olstad.com. For more options, visit https://groups.google.com/d/optout.