=== xv9 is now known as XV8|Away [09:13] Hi [09:16] 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:18] Or should I file a bug report? [09:43] Where can I see cc_ansible's output? [10:38] kciN: in cloud-init's debug log [10:45] meena: thanks, found it [10:47] 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. [11:02] kciN: "fails to connect"? [11:20] waldi yeah, ssh refuses connection [11:21] might be some kind of race condition like one described here: https://groups.google.com/g/ansible-project/c/iRA5IL-dLd0 [11:25] kciN: this sounds wrong. you are already running on the system, why use ssh? [11:28] I'm creating several ec2 instances, one of which is an ansible tower and configures the others [11:28] Others are created before the tower [11:28] All of this is done with terraform [11:29] so where exactly is your problem? because tower needs to be able to handle unreachable systems on it's own [11:30] but anyway, this does not longer sound like a cloud-init problem, but a problem in your installed software [11:32] 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:33] but you run on the local system, so no ssh is involved [11:34] except if you try to reach _another_ system [11:35] the tower tries to reach _another_ ec2 instance [11:35] so your problem is in the tower software, not cloud-init [11:36] look, how come `sudo cloud-init single --name cc_ansible` runs fine, but `cloud-init` itself fails? [11:37] Regardless of what I'm doing inside the ansible playbook [11:38] On an unrelated note, can I send directories with cloud-init? [12:55] I think the issue is caused by runcmd running after ansible [12:55] instead of before [12:57] Yes, indeed, according to /etc/cloud-init/cloud.cfg scripts-user runs after ansible === 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