2017-06-25 4:14 GMT+02:00 Dag Wieers <[email protected]>:

On Fri, 23 Jun 2017, Reiner Nippes wrote:
>
>
> -snip-
>
> a) Is this a bug in "wait_for_connection:"? (I think yes.)
>>
>
> No, wait_for_connection does a complete end-to-end test by running a
> ping/win_ping module on the remote end. If it reports 'ok', then the
> service worked without a doubt.
>
> The time-out waiting for a privileged escalation prompt indicates to me
> that when the system returns and provides a working transport, that the
> privilege escalation is not working yet.
>
> If this is the case, we should be looking at making sure that
> wait_for_connection is also using the privilege ecalation. That might be a
> solution, but you have to check. Did you try running it as root (without
> privilege escalation) or running everything as user.
>
> Does it fail in this case too ?
>
>
How to test this? "become: false"?

The first thing I configure on the machine is a swap file. So the playbook
needs root privileges.

What I can tell is that it seems to be a SLES 12 problem. In the cloud-init
file of the EC2 instances I have a

runcmd:
  - export HTTPS_PROXY=http://<blabla>:8080
  - /usr/sbin/registercloudguest --force-new

to register SLES to the SUSE repos.

If I disable this three lines wait_for_connection: is working. (I tried
several times.)

But I don't know what registercloudguest is doing and how this is effecting
privilege escalation of ansible.


>
> b) How to write a playbook that is fail safe?
>>
>
> It appears that somehow on your system the service becomes available, and
> then disappears or is blocked again. And that seems to be the problem. If
> this has to do with timing and you know it settles afterwards within 15
> seconds, you could add a `pause` task.
>

Which "service" does ansible use for privilege escalation? I think "sudo"
is not a running service so I can't be blocked.Or?


> But the essence here is, you have to figure out what exactly is happening,
> before you can come up with a working solution.
>
> Difficult to debug because during boot I can't access the machine. And
later in cloud-init-output.log is nothing about any error message.

Reiner

-- 
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/CAA12wy1bANphS1Zg37rqkHuUtv6Kn-dO-5-s2QrNfsMyo9EdOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to