pip --version
pip3 --version
dnf install python
dnf install python-pip
pip --version
pip install ansible
ansible --version
pip -Vpip install boto3 botocore
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sts:AssumeRole"
],
"Principal": {
"Service": [
"ec2.amazonaws.com"
]
}
}
]
}
To see lines in vim, run the following command:
:set nu
Create test.yml the file, add the following:
- name: Ansible Play
hosts: localhost
tasks:
- name: launching AWS instance using Ansible
amazon.aws.ec2_instance:
key_name: Key
region: us-east-1
instance_type: t2.micro
image_id: ami-0182f373e66f89c85
tags:
Name: Demo_server
Check the syntax of the file:
ansible-playbook --syntax-check test.yml
ansible-playbook -C test.yml
ansible-playbook test.yml
The ec2 should appear in the console.
Check docs
ansible-doc -t module -l | grep amazon.aws.ec2_instance
No hay comentarios:
Publicar un comentario