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

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -