Code Monkey home page Code Monkey logo

lamp-wordpress-roles's Introduction

lamp-wordpress-roles

A basic LAMP stack environment that creates an environment for wordpress websites which is built using ansible roles. It consists of the following:

  • Apache Webserver
  • PHP 7.4
  • MariaDB server
  • Wordpress (latest)

Prerequisites

  • Ansible
  • Ansible-galaxy
  • SSH and key-based authentication from the ansible machine to the remote server.

Variables Used

mariadbroot_pw: "mysqlpass123" #-------database root password-------#
db_name: "wordpress"  #-------Wordpress database name-------#
db_user: "wordpress"  #-------WordPress username-------#
db_password: "wordpress"  #-------WordPress db password-------#
httpd_port: 80  #-------port for apache-------#
httpd_user: "apache" #-------apache user-------#
httpd_group: "apache"  #-------apache group-------#
domain_name: "wordpress.freeda-francis.tech"  #-------domain name-------#
wp_url: "https://wordpress.org/latest.tar.gz"  #-------WordPress download URL-------#

Features

In this demo, we will be making use of 2 ansible roles - LAMP & WordPress.

  • LAMP : In lamp role, we will be installing and configuring Apache, MySQL, PHP and its required dependencies.
  • WordPress : In wordpress role, we will downloading the latest wordpress, extracting its contents and setting up the custom wp-config.php file to complete its installation.

Usage

  1. Initially, create 2 roles - lamp & wordpress in the roles_path using the below command
ansible-galaxy init lamp
ansible-galaxy init wordpress
  1. Get the contents of the roles - lamp & wordpress and place them in location 'roles_path' specified in the ansible config file (ansible.cfg).

  2. Then, you can run the main.yml playbook using the command

ansible-playbook -i inventory main.yml

Once the above steps has been completed, your wordpress will be ready in the specified domain name.

Result

image

image

lamp-wordpress-roles's People

Contributors

freeda-f 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.