Michel,
Perfect that solved the issue :) Thanks On Thursday, October 16, 2014 9:31:21 PM UTC+2, Michael Peters wrote: > > I have provisioning playbooks (AWS) that create the server. They then > use add_host to add it to the inventory. > When using add_host you can pass other variables along that act just > like host_vars that came from the inventory (AFAIK). > If you pass the ansible_ssh_user you can set the user that ansible > uses for the remainder of that play to access that > host. > > You can also add the host to any applicable groups. This is where I > then do my boostrapping of the host and the application of it's > necessary roles. > Then when you run another playbook later, the host is now in the > dynamic inventory and picks up the new real username that works after > the bootstrapping has been applied. > > There's probably other ways to do it, but that's worked pretty well so > far. > > On Thu, Oct 16, 2014 at 12:16 PM, DomaNitro <[email protected] > <javascript:>> wrote: > > Hi > > > > We provision our servers in a cloud provider. The provider injects ssh > keys > > and create a temp user for our initial connection. > > We use that temp user to provision the machine and then the temp user > will > > be disabled. > > > > So the next run for plays will fail because remote_user does not exist > > anymore. > > > > Any ideas how we might tackle this in an automated way? > > > > Our goal is every person uses hes username > > > > -- > > 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] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/b15d6d53-b9de-4737-ba3f-967b8d1111a0%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > -- 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/d4669f2b-cc8b-4e6a-a936-f81200e355e0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
