[ansible-project] Re: Please explain ec2_instance volumes config

2018-08-26 Thread Bruce Affonso

I think this thread got derailed - so is there a way to configure volume 
with the ec2_instance module?  

It works with ec2 module but hoping to use the ec2_instance module since it 
uses boto3 which I am told would help me workaround an issue I am having 
launching ec2 instances from a server with IAM role attached vs 
access/secret keys.

-- 
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+unsubscr...@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/f962b6ae-c6a3-47fd-bdc3-63be3a47e0e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ec2_vol and windows hosts

2018-08-26 Thread Bruce Affonso
Hi,

I know how to use ec2_vol to mount a drive to a Windows host.  Are there 
and Ansible options or modules available that then allow that drive to be 
set online, initialized and formatted or do we need to use powershell 
commands?

Thanks,

Bruce

-- 
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+unsubscr...@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/d20c996e-3b88-4860-a539-dcd8a95f5729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Is it possible to pass SSH key contents as argument when running ansible-playbook

2018-08-15 Thread Bruce Affonso
Hi,

We are storing private keys in a DB and when we need to run a playbook 
would like to pass these SSH keys as an argument instead of storing as a 
file locally.

I tried something like this:

ansible-playbook -i "1.2.3.4," --extra-vars="ansible_user=username 
ansible_ssh_private_key_file=$KEY" playbooks/playbook.yml

but get message 'No such file or directory'

It works if I specify a key file (and location).  $KEY in an environment 
variable with private key contents.

So, is there a way to pass $KEY without having to create a file?

Thank you

-- 
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+unsubscr...@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/e318a0e1-d666-4d27-bef0-61ed5646d324%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Please explain ec2_instance volumes config

2018-08-11 Thread Bruce Affonso
I am trying to use the ec2_instance module to create an ec2 instance.  When 
using the ec2 module to configure a volume one would do something like this:

volumes: 
  - device_name: /dev/sda1 
volume_type: gp2 
volume_size: 50

With ec2_instance I am not sure how to set the values.

In the description it says:  

A list of block device mappings, by default this will always use the AMI 
root device so the volumes option is primarily for adding more storage.
A mapping contains the (optional) keys device_name, virtual_name, 
ebs.device_type, ebs.device_size, ebs.kms_key_id, ebs.iops, and 
ebs.delete_on_termination.

Please let me know how I would set the info from above example using the 
ec2_instance module.

Thank you

-- 
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+unsubscr...@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/82ba8db3-ed16-4230-9eaa-743a74fbebe0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.