Skip to content

joshzenker1/ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Playbooks

I'm teaching myself Ansible using the free tier of AWS. I'll be keeping my playbooks here.

Before I could begin, I had to configure an Ansible server running in my AWS VPC. I started with a RHEL 7 instance because I was already familiar with Red Hat. I also wanted to use the dynamic inventory I saw described in an AWS blog post. There was a sequence of prerequisites I needed to satisfy.

  1. Download EPEL RPM from EPEL wiki
  2. Install Boto from EPEL
  3. Install pip from EPEL
  4. Install AWS CLI using pip
  5. Create IAM role with read-only access
  6. Launch an instance with the new IAM role
  7. Download EC2 scripts from Ansible GitHub repo
  8. Configure command line environment according to instructions in blog post (and export ANSIBLE_HOSTS in ~/.bash_profile)
  9. Edit ec2.ini to make AWS CLI use private DNS names and IPs

The time I spent configuring these prerequisites turned out to be worthwhile. A dynamic inventory allows me to refer to groups of AWS instances by their tags. I can also automatically apply my playbooks to new instances launched since the last time I ran Ansible.

References

Releases

No releases published

Packages

No packages published