Skip to content

Ansible Playbook for Automation Installation & Configuration LAMP (Linux Apache MariaDB PHP) + CMS WordPress

Notifications You must be signed in to change notification settings

madfxr/ansible-lamp-wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Playbook for Automation Installation & Configuration LAMP (Linux Apache MariaDB PHP) + CMS WordPress

Automate installation & configuration of CentOS Server with software package specification LAMP (Linux Apache MariaDB PHP)

Requirements

  • Git
  • Ansible 2+

Installation

First, you need to install Git and Ansible first in the master and the following commands you can follow:

yum install epel-release -y
yum update -y
yum install git ansible -y

After that, clone the required repository:

cd /opt/
git clone https://github.com/madfxr/ansible-lamp-wordpress.git

To see which version of Ansible is installed, type the following command:

ansible --version

The next step is to generate the SSH Key, this is done to generate the Private Key and Public Key which will be used as the authentication of the search for communication between two or more hosts, the following commands are:

ssh-keygen -t rsa -b 4096

Make changes to the host according to your needs:

vi /etc/ansible/hosts

and add the following line of code below:

[ansiblehost]
192.168.1.1

The next process is to authenticate login on host 192.168.1.1, and following the command:

ssh-copy-id [email protected]

To perform connection checks on previously added hosts, run the following commands:

ansible -m ping ansiblehost

To install packages and configure LAMP (Linux Apache MariaDB PHP) + CMS Wordpress, run the following command:

ansible-playbook /opt/ansible-lamp-wordpress/roles/install-lamp-wordpress.yml

To remove packages and configuration files LAMP (Linux Apache MariaDB PHP) + CMS WordPress, run the following command:

ansible-playbook /opt/ansible-lamp-wordpress/roles/erase-lamp-wordpress.yml

Notes

  • Ansible Playbook is still tried on CentOS 7 x86_64 only
  • If you are using another operating system, feel free to make changes to an existing role
  • To make changes to the Ansible configuration file, you can change the following files:
/etc/ansible/hosts
/opt/ansible-lamp-wordpress/.my.cnf
/opt/ansible-lamp-wordpress/wp-config-sample.php
/opt/ansible-lamp-wordpress/roles/erase-lamp-wordpress.yml
/opt/ansible-lamp-wordpress/roles/install-lamp-wordpress.yml
/opt/ansible-lamp-wordpress/roles/wp-dependencies/defaults/main.yml
/opt/ansible-lamp-wordpress/roles/wp-dependencies/tasks/main.yml
/opt/ansible-lamp-wordpress/roles/wp-install-config/tasks/main.yml

About

Ansible Playbook for Automation Installation & Configuration LAMP (Linux Apache MariaDB PHP) + CMS WordPress

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages