Ansible
Ansible is configuration management tool written in python.
Last updated
Ansible is configuration management tool written in python.
Last updated
Ansible is a simple IT automation system. It handles configuration management, application deployment, cloud provisioning, ad-hoc task execution, network automation, and multi-node orchestration. More information on the Ansible documentation.
Create an EC2 role with required permissions so Ansible can read EC2 system information via the AWS API. Attach this role to the EC2 instance where Ansible is installed.
Install Ansible on EC2 instance an prepare configuration files
ansible.cfg
aws_ec2.yaml
eu-west-1.aws_ec2.yaml
Display the configured inventory as Ansible sees it.
Get Kernel information from all hosts
Create a Google Service Account with required permissions so Ansible can read GCP instance information via the API.
Install Ansible on GCP instance an prepare configuration files.
ansible.cfg
environment.gcp_compute.yaml
serviceaccount.json
When spinning up new EC2 or GCP instances add labels to each instance. Ansible will use this labels to create groups. When running ansible commands you can use this groups to execute commands only on a subset of servers.
Terraform Snippet for adding labels