inventory file in jenkins server

65 views
Skip to first unread message

Edson Noboru Yamada

unread,
Sep 1, 2016, 10:49:14 PM9/1/16
to ansible...@googlegroups.com

I have several hosts to manage and, in order to access them, i have to use a couple of different ssh keys (and I set the ansible_ssh_private_key_file in the inventory file to tell ansible which key to use).

The thing is that i've been maintaining 2 inventory files versions (which is a pain): one for my station (where ansible_ssh_private_key_file  points to my home dir -- /home/enyamada/.ssh) and other for jenkins server (with ansible_ssh_private_key_file  pointing to /var/jenkins/.ssh files). Everything else is the same.

What's the best way to circumvent this problem? (and keep a single version?)

Thank you!


Kai Stian Olstad

unread,
Sep 2, 2016, 4:04:05 AM9/2/16
to ansible...@googlegroups.com
I guess /var/jenkins is the home directory for the Jenkins user, in that
case you could use ~/.ssh or $HOME/.ssh

--
Kai Stian Olstad

Edson Noboru Yamada

unread,
Sep 2, 2016, 8:05:14 AM9/2/16
to ansible...@googlegroups.com
Thank you, Kai, it worked.



--
Kai Stian Olstad

--
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-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/642124f3-e9f0-a5b7-c425-ee1d53d07405%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages