=== xv9 is now known as XV8|Away | ||
kciN | Hi | 09:13 |
---|---|---|
kciN | cc_ansible runs ansible-playbook as root instead of run_user. Is that an expected behavior? If so, how do I run ansible-playbook as myuser instead of root? | 09:16 |
kciN | Or should I file a bug report? | 09:18 |
kciN | Where can I see cc_ansible's output? | 09:43 |
meena | kciN: in cloud-init's debug log | 10:38 |
kciN | meena: thanks, found it | 10:45 |
kciN | However I still can't figure out why ansible fails to connect on initial run, but when I run it with `sudo cloud-init single --name cc_ansible` it succeeds. | 10:47 |
waldi | kciN: "fails to connect"? | 11:02 |
kciN | waldi yeah, ssh refuses connection | 11:20 |
kciN | might be some kind of race condition like one described here: https://groups.google.com/g/ansible-project/c/iRA5IL-dLd0 | 11:21 |
waldi | kciN: this sounds wrong. you are already running on the system, why use ssh? | 11:25 |
kciN | I'm creating several ec2 instances, one of which is an ansible tower and configures the others | 11:28 |
kciN | Others are created before the tower | 11:28 |
kciN | All of this is done with terraform | 11:28 |
waldi | so where exactly is your problem? because tower needs to be able to handle unreachable systems on it's own | 11:29 |
waldi | but anyway, this does not longer sound like a cloud-init problem, but a problem in your installed software | 11:30 |
kciN | I supply cloud-init config with user_data from terraform, it runs ansible playbook, which is also uploaded with user_data. Here's why I think the problem is in cloud-init, when I run `sudo cloud-init single --name cc_ansible` everything runs fine, but when it runs on it's own, i.e. on creation, I get errors in cloud-init logs. | 11:32 |
waldi | but you run on the local system, so no ssh is involved | 11:33 |
waldi | except if you try to reach _another_ system | 11:34 |
kciN | the tower tries to reach _another_ ec2 instance | 11:35 |
waldi | so your problem is in the tower software, not cloud-init | 11:35 |
kciN | look, how come `sudo cloud-init single --name cc_ansible` runs fine, but `cloud-init` itself fails? | 11:36 |
kciN | Regardless of what I'm doing inside the ansible playbook | 11:37 |
kciN | On an unrelated note, can I send directories with cloud-init? | 11:38 |
kciN | I think the issue is caused by runcmd running after ansible | 12:55 |
kciN | instead of before | 12:55 |
kciN | Yes, indeed, according to /etc/cloud-init/cloud.cfg scripts-user runs after ansible | 12:57 |
=== XV8|Away is now known as xv9 | ||
=== xv9 is now known as XV8|Away | ||
=== XV8|Away is now known as xv9 | ||
=== xv9 is now known as XV8|Away | ||
=== XV8|Away is now known as xv9 | ||
=== xv9 is now known as XV8|Away | ||
=== XV8|Away is now known as xv9 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!