How to deploy ec2 instance via ansible using RHEL8 | Solved Boto error

Опубликовано: 01 Июль 2020
на канале: MMZ
183
2

Install RHEL8 and register
subscription-manager attach register
subscription-manager attach --auto
subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms
subscription-manager repos --enable rhel-8-for-x86_64-supplementary-rpms

Install required packages
yum -y install @development
yum -y module install python36
yum -y install ansible

Prepare amazon account
create IAM user account and make sure Admin Role
get secuirty credentials
access ID
access KEY
create ec2 key pair

Basic EC2 playbook for demo
ref: https://docs.ansible.com/ansible/late...
update amazon secret key ~/.bashrc
export AWS_ACCESS_KEY_ID='abc123'
export AWS_SECRET_ACCESS_KEY='xyz123''
source ~/.bashrc
update "key_name"
update "group"

Run the playbook and troubleshoot
ansible-playbook "playbook-name.yml"
git clone https://github.com/myominzin/boto-pkg...
yum localinstall boto-pkg-rhel8/python3*