=== xv9 is now known as XV8|Away
kciNcc_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
kciNOr should I file a bug report?09:18
kciNWhere can I see cc_ansible's output?09:43
meenakciN: in cloud-init's debug log 10:38
kciNmeena: thanks, found it10:45
kciNHowever 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
waldikciN: "fails to connect"?11:02
kciNwaldi yeah, ssh refuses connection11:20
kciNmight be some kind of race condition like one described here: https://groups.google.com/g/ansible-project/c/iRA5IL-dLd011:21
waldikciN: this sounds wrong. you are already running on the system, why use ssh?11:25
kciNI'm creating several ec2 instances, one of which is an ansible tower and configures the others11:28
kciNOthers are created before the tower11:28
kciNAll of this is done with terraform11:28
waldiso where exactly is your problem? because tower needs to be able to handle unreachable systems on it's own11:29
waldibut anyway, this does not longer sound like a cloud-init problem, but a problem in your installed software11:30
kciNI 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
waldibut you run on the local system, so no ssh is involved11:33
waldiexcept if you try to reach _another_ system11:34
kciNthe tower tries to reach _another_ ec2 instance11:35
waldiso your problem is in the tower software, not cloud-init11:35
kciNlook, how come `sudo cloud-init single --name cc_ansible` runs fine, but `cloud-init` itself fails?11:36
kciNRegardless of what I'm doing inside the ansible playbook11:37
kciNOn an unrelated note, can I send directories with cloud-init?11:38
kciNI think the issue is caused by runcmd running after ansible12:55
kciNinstead of before12:55
kciNYes, indeed, according to /etc/cloud-init/cloud.cfg scripts-user runs after ansible12: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!