Running ansible playbooks in Bamboo?

1,098 views
Skip to first unread message

ZillaYT

unread,
Jul 20, 2016, 10:53:31 AM7/20/16
to Ansible Project
I saw this post, but my problem is different.

I have Bamboo agents that runs scripts under a "bamboo" user. Now this bamboo user needs to run ansible playbooks on a newly-created server. However, this newly-created server does NOT have the bamboo user's ssh public key yet. So what is the recommended way of adding bamboo user's public key to the newly-created server's /home/bamboo/.ssh/authorized_keys file? Do I just create an image with it there already?

Thanks

Vyacheslav

unread,
Jul 21, 2016, 9:07:49 AM7/21/16
to Ansible Project
If you have credentials to the host, you might create parametrized bamboo job like "bootstrap.box" , which will execute small playbook to configure new box for bamboo (like add keys, perhaps create some user and so on)

Stephen Granger

unread,
Jul 21, 2016, 12:03:10 PM7/21/16
to ansible...@googlegroups.com
From memory, the bamboo boot process doesn't allow any boot strapping for running user data scripts, it hides/locks that away.

https://confluence.atlassian.com/bamboo/configuring-elastic-bamboo-289277120.html

As has been suggested, run a prior job to set up the users details, or follow your suggestion of creating a custom AMI. 


--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5335722a-8da1-48d7-a3a7-66892f31538a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve
Reply all
Reply to author
Forward
0 new messages