Code Monkey home page Code Monkey logo

ansible-lamp-wordpress's Introduction

Ansible-Lamp-WordPress

Ansible Playbook to Setup Amazon Linux Server With a WordPress Website

Description:

A simple ansible playbook to setup a wordpress website on amazon linux based servers with custom virtual host on apache webserver. Ansible is an open-source software provisioning tool by Red Hat. We can use Ansible for cloud provisioning, configuration management, application deployment etc.

In this repo I have created a simple playbook to create a WordPress website with apache, MySQL database and PHP7.4 on Amazon Linux based servers. As of now this is just a experimental work on ansible palybook. But this can be edited to use for other linux OS families also.

Features:

  • One step creation of website is desired number of servers.
  • Variables file to manage MySQL root password, WordPress database details etc.
  • Can also specify major php ini settings like upload_max_filesize , memory_limit etc using variables file
  • All the components are installed through the playbook like (Apache, MySQL, PHP, Wordpress)

How to Use:

1. Install Git and Ansible on Master Server.
yum install git -y
amazon-linux-extras ansible2 -y
2. Clone this Repo and Create hosts file for ansible playbook and create key file
git clone https://github.com/MarkAntonyGit/Ansible-Lamp-WordPress.git
cd Ansible-Lamp-WordPress
Vim hosts (Add ansible client server details)
Vim keyfile.pem (Add private key file for ansible client servers)
chmod 600 keyfile.pem

-- Sample Hosts File

3. Edit Variables, Check Connection and Run Play
ansible -i hosts all -m ping (To check your master and client connection)
vim lamp_wp_variables.yml (To edit variables)
ansible-playbook -i hosts playbook_lamp_wordpress.yml --syntax-check 
ansible-playbook -i hosts playbook_lamp_wordpress.yml

--Sample Variables File

Sample Output Screenshots:

--Play Outputs

--Website Outputs

If you are using a demo website name. Please use the following online tool for checking the website via hosts method or you can use the local hosts file of your PC.

Connect with me

-------- ----------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------ -------------------------------------------------------

ansible-lamp-wordpress's People

Contributors

markantonygit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.