Skip to content

Guitaraholic/Vagrant-Ansible-Wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrant Ansible Wordpress

Vagrant-Ansible-Wordpress

Prerequisites

You'll need to have the following prerequisites installed on your workstation:

vagrant box add bento/ubuntu-16.04

Quick Start

  $ git clone [email protected]:Mayccoll/Vagrant-Ansible-Wordpress.git
  $ cd Vagrant-Ansible-Wordpress
  $ vagrant up

DONE!!!

Once the process is finished you will see the installation data in your terminal

Terminal

Install wordpress

In your browser go to http://192.168.70.70 and follow the installation process.

Wordpress

Optional: you can add the next rule to your host file and go to http://mywordpress.local

192.168.70.70     mywordpress.local

use this command line to add the rule:

$ echo "\n192.168.70.70     mywordpress.local" | sudo tee -a /etc/hosts

Access wordpress files:

Inside your repository in ./www/wordpress/ folder you will find all the wordpress files

.
├── ansible
├── config.yaml
├── README
├── share
├── Vagrantfile
└── www
    └── wordpress
        ├── index.php
        ├── license.txt
        ├── readme.html
        ├── wp-activate.php
        ├── wp-admin
        ├── wp-blog-header.php
        ├── wp-comments-post.php
        ├── wp-config-sample.php
        ├── wp-content
        ├── wp-cron.php
        ├── wp-includes
        ├── wp-links-opml.php
        ├── wp-load.php
        ├── wp-login.php
        ├── wp-mail.php
        ├── wp-settings.php
        ├── wp-signup.php
        ├── wp-trackback.php
        └── xmlrpc.php

Advanced

Configuration

There are one configuration file CONFIG.yml.

.
└── CONFIG.yml

Config VirtualBox VM

./CONFIG.yaml

- name               : vag-wordpress
  box                : bento/ubuntu-16.04
  box_version        : 2.2.9
  box_check_update   : false
  ram                : 1028
  cpus               : 1

Defining a Forwarded Port

./CONFIG.yaml

ports           :
  - guest       : 3000
    host        : 3000

  - guest       : 80
    host        : 8080

Config Synced folders

./CONFIG.yaml

  syncDir         :
    - host        : share
      guest       : /home/vagrant/share

    - host        : www
      guest       : /home/vagrant/www
      owner       : vagrant
      group       : vagrant
      dmode       : 775
      fmode       : 775

Ansible

Ansible Playbook

This playbook will install all the dependencies for wordpress.

It can be found in:

./ansible/playbook.yaml

Config Ansible Vars

You can config wordpress database, user and password in CONFIG.yml

./CONFIG.yml

---
  # | ······ Set Domain URL
  wpDomain          : 'mywordpress.local'

  # | ······ MySQL Config
  mysqlUser         : 'root'
  mysqlPass         : 'vagrant'
  mysqlTemplatePath : 'templates/my.cnf'

  # | ······ MySQL Database
  dbName            : 'wordpress'
  dbUser            : 'wordpress'
  dbPass            : 'vagrant'

  # | ······ Wordpress Config
  wordpressPath     : '/home/vagrant/www'
  wordpressTemPath  : 'templates/wp-config.php'
  vhostTemplatePath : 'templates/vhost.conf'

  # | ······ Vagrant User and Group
  home              : '/home/vagrant'
  owner             : 'vagrant'
  group             : 'vagrant'

PhpMyAdmin

http://192.168.70.99:8088

  • Username: wordpress
  • Password: vagrant

www

http://192.168.70.99:8080

Local folder: ./html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages