Skip to content

An Ansible Module to create a Multisite Wordpress Server

License

Notifications You must be signed in to change notification settings

jahrmando/ansible-wordpress-multisite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-worpress-multisite

An Ansible Module to create a Multisite Wordpress Server (Debian 10)

Instalation

Just create your vars.yaml from vars.yaml.example

Configurations:

  • www_path: Directory where all project will install
  • blog: A dictionary with all variables for each site
    • name. Identifier for the Wordpress instance, we use to set database/files configurations
    • url. Domain name for the site
    • dbpass. Database's password
    • wpsecret. It need it for encryptions session on Wordpress. Random string
    • enable_https. To enable HTTPS Support

If you enable HTTPS support you have to add certs for the blog with Identifier name for the site. Example: My ID (name) for the site is myblog, I put on the directory src the follow files: myblog.crt and myblog.key

Example of configuration:

---
ansible_python_interpreter: auto_legacy
www_path: '/var/www'
# Support for multisite
blogs: 
  - name: myblog
    url: myblog.lan
    dbpass: devtest
    wpsecret: tEOYnJfkQrroCecwk8Tc1GAt7GzXLSI6 # A ramdom string
    enable_https: false
  - name: anothersite
    url: anothersite.lan
    dbpass: devtest
    wpsecret: vPi[+BvdHXr76KMQP*5Q3%omGubx%q-itT # A ramdom string
    enable_https: false

Testing

We tested this playbook with Vagrant

$ vagrant up

If you need test some updates

$ vagrant up --provision 

About

An Ansible Module to create a Multisite Wordpress Server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages