How to create a new key in Ansible using the ec2_key module? -


How do I use the ec2_key module in Ansible? Can someone give me an example of creating a new keypair?

Example of work:

  - Name: an EC2 key Create ec2_key: Name: "mykey" field: "eu-west-1" Register: ec2_key - Name: Save the private key copy: Content: "{{ec2_key Key.private_key}}" dest: "./aws-private Pem "mode: 0600 when: ec2_key.changed  

Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -