Skip to content

PythonNeo/wordpress-ansible

 
 

Repository files navigation

Wordpress Ansible project for IT Security

When cloning please use this command

This command will update all submodules automatically.

  • git clone --recursive URL
  • For example: git clone --recursive https://github.com/Nicl0996/wordpress-ansible.git

If you didnt clone with --recursive, follow this:

  • git clone URL
  • cd /repository/
  • git submodule init
  • git submodule update

Vagrant versions tested

  • Vagrant 1.8.1
  • Vagrant 1.7.4

Ansible versions tested:

  • Ansible 2.0.1.0

Virtualization tested:

  • Virtualbox v5.0
  • KVM

Getting Ansible latest Version:

  • sudo apt-get install software-properties-common
  • sudo apt-add-repository ppa:ansible/ansible
  • sudo apt-get update
  • sudo apt-get install ansible

About:

When Vagrant is run, a Virtual Machine is created, it runs the Ansible playbook, which installs Apache2, PHP, MySQL and a Wordpress web app that is accessible from the LAN and a database is to be imported. This system will have automated Backups, so a complete restoration is done from the latest Backup after every "Vagrant up".

How to use:

  1. Clone the repository found here: Repository
  2. Make sure, Vagrant and Ansible are installed on your machine.
  3. In command-line - Navigate to the Cloned repository - cd /home/user/git/wordpress-ansible/
  4. Start Vagrant - vagrant up
  5. To SSH to the system - vagrant ssh
  6. get the virtual machines ip address - vagrant ssh-config | grep HostName | cut -d ' ' -f4
  7. To connect to Wordpress by pointing your browser to the ip addres/hostname

Testing the system:

Follow the instruction in the link below.

Tests

Vagrantfile info:

VM Box: debian/jessie64
VM Provider: Virtualbox
VM Provision: Ansible
Ansible Playbook: "playbook.yml"

Ansible Roles:

server
apache2
php
mysql
wordpress
generic-debian

Generic Debian role

This is a submodule containing an Ansible role that ensures all unattended updates are updated. 
To add a submodule to a repository: 

git submodule add https://github.com/moozer/ansible-generic-debian.git generic-debian

Pull Requests:

Before making a pull request follow the instructions in the link below.

AboutPullRequest

Todo:

  1. consolidation/basic functionality

    1. vagrant up workning with KVM and virtualbox - done

    2. write a basic README.md file with short description - done

    3. restructure to follow ansible best practice dir structure

    4. make script or describe how to perform integration tests

    5. describe PR requirements in reade file

    6. make vagrant up on windows work with ansible

    7. make ansible install mysql

    8. make ansible install wordpress

  2. Development

    1. check_mk (not security for now)

    2. set up log server and send all logs to that server (CSC6)

    3. set up backup and restore for mysql (CSC10)

    4. set up backup and restore for wordpress (CSC10)

    5. authorized software (CSC2)

    6. secure config (CSC3)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published