FAQ
I'm using Ansible to manage multiple EC2 instance that could be launched
dynamically, keypair is generated for each instance then store in local
machine.

Previously I use default inventory file and in Ansible I can use lineinfile
module to add new EC2 host to hosts file with additional vars like
ansible_ssh_user, ansible_ssh_private_key_file, that's very convenient as
each time I run Ansible playbook I dont have to explicitly specify SSH key.

But now with change to use EC2 inventory, I can't find a way to add such
kind of vars to EC2 host, I know using ssh-agent is a solution, but I would
look for a more explicit method that I can manage keys better than just add
every generated key to ssh-agent.

Any suggestions?

--
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/f02e66be-f40e-4b7a-b10a-b51706532e55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Brian Coca at Jun 1, 2015 at 2:09 pm
    create host_vars/<hostname> yaml files with the same info, in a
    directory adjacent to the dynamic inventory.
    On Sat, May 30, 2015 at 2:06 PM, Do Hoang Khiem wrote:
    I'm using Ansible to manage multiple EC2 instance that could be launched
    dynamically, keypair is generated for each instance then store in local
    machine.

    Previously I use default inventory file and in Ansible I can use lineinfile
    module to add new EC2 host to hosts file with additional vars like
    ansible_ssh_user, ansible_ssh_private_key_file, that's very convenient as
    each time I run Ansible playbook I dont have to explicitly specify SSH key.

    But now with change to use EC2 inventory, I can't find a way to add such
    kind of vars to EC2 host, I know using ssh-agent is a solution, but I would
    look for a more explicit method that I can manage keys better than just add
    every generated key to ssh-agent.

    Any suggestions?

    --
    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/f02e66be-f40e-4b7a-b10a-b51706532e55%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    Brian Coca

    --
    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/CAJ5XC8k3cBwLioJ6%2BujxrXS_vmCVy2v-%2BuCmn6MnEL95xP0gNA%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupansible-project @
postedMay 30, '15 at 6:06p
activeJun 1, '15 at 2:09p
posts2
users2

2 users in discussion

Brian Coca: 1 post Do Hoang Khiem: 1 post

People

Translate

site design / logo © 2022 Grokbase