On 06/16/14 17:52, [email protected] wrote:
> I've written the following playbook that seems to work perfectly,
> except when I comment out the kernel update task. Hopefully nothing
> that I've just missed from the docs.
>
> |
> ---
> -name:system updates
>   hosts:production
>   remote_user:ansible
>   sudo:yes
>
>   tasks:
>     -name:install kernel updates
>       action:yum name=kernel*state=latest
>       # If there are any updates, we register the below
>       # This will trigger a reboot
>       register:kernelup
>
>     -name:install other updates
>       action:yum name=*state=latest
>       register:kernelup
>
>     -name:reboot the system
>       command:reboot
>       when:kernelup.changed
>
>     -name:wait forssh to come back up
>       local_action:wait_for host={{ansible_fqdn
> }}port=22delay=120timeout=900state=started
>       when:kernelup.changed
>
>     -name:restart services
>       service:name=sendmail state=restarted
> |
>
>
>
> The other updates work fine so I'm not sure what could be causing the
> issue.
> Also, is there a way to embed the encrypted password for the ansible
> account somewhere secret somewhere rather than having to enter the
> sudo password all the time? Not sure what is best practice with Ansible?
>
> Thanks in advance.
> -- 
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8410ae09-8af1-409c-a444-2cfd5cf635a1%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/8410ae09-8af1-409c-a444-2cfd5cf635a1%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

It seems that you should register 'kernelup' only for the first task,
not twice.

-- 
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/539F1227.70609%40yahoo.gr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to