To follow along with this automation, you need to have the following
- Ansible installed on your local machine
- An Ubuntu instance with SSH key-based authentication
-
Clone the repository to your local machine
git clone https://github.com/kensanni/LAMP-stack-application.git
-
Navigate to the
LAMP-stack-application
directorycd LAMP-stack-application
-
Open the
main.yml
file inmysql/defaults
directory and edit the file to pass in your database values. Leave the my_sql_user untouched.--- wp_mysql_db: wordpressDatabase wp_mysql_user: WORDPRESS_DATABASE_USER wp_mysql_password: WORDPRESS_DATABASE_PASSWORD my_sql_user: root
-
Open the
inventory
file and pass in your values. check theinventory.example
file for guidance -
On your terminal, make sure you're on the root directory of this project and run the command below
ansible-playbook -i inventory wordpress.yml
-
Once the command in step 5 has finished running, copy and paste in your server IP address into your browser. You should see a wordpress site on your browser.