Skip to content

🚀Host WordPress in your AWS Account. Create a VPC with AWS CloudFormation and install WordPress with Ansible.

License

Notifications You must be signed in to change notification settings

fishhelper/ansible-ec2-wordpress

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible -> EC2 -> Wordpress

Host WordPress in your AWS Account. Create a VPC with AWS CloudFormation and install WordPress with Ansible.

Description

Creates a VPC to to host a Wordpress website. Launches t2.small instances. Installs the latest version of Wordpress with an Ansible playbook. Assigns an Elastic IP to the Wordpress EC2 instance.

Directions

In the region 'us-east-1':

  1. Create a VPC with the CloudFormation template wordpress-vpc-cloudformation.json
  2. ssh to the Ansible Host ssh -i your_key.pem ec2-user@...
  3. Copy your .pem file to the Ansible host ~/.ssh/your_key.pem
  4. Change your .pem file copy to be read only: chmod 400 ~/.ssh/your_key.pem
  5. cd ansible-ec2-wordpress
  6. Run the playbook: ansible-playbook --private-key="~/.ssh/your_key.pem" site.yml
  7. Done! Visit the WordPress host in your web browser

Architecture

Troubleshooting

  1. Verify Ansible installed /var/log/cloud-init-output.log
  2. ssh to the wordpress host with ssh -i your_key.pem ubuntu@...
  3. Verify your IAM permissions to create VPC and EC2 resources

AMI IDs for other regions

  1. Ubuntu 14.04 AMI IDs here: https://cloud-images.ubuntu.com/locator/ec2/
  2. Amazon AMI IDs here: https://aws.amazon.com/amazon-linux-ami/

About

🚀Host WordPress in your AWS Account. Create a VPC with AWS CloudFormation and install WordPress with Ansible.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published