https://github.com/spofibo/ansible-wordpress
Ansible playbook to configure one more secure Wordpress sites
https://github.com/spofibo/ansible-wordpress
ansible ansible-playbook certbot cloudflare nginx php vagrant vagrantfile wordpress
Last synced: about 2 months ago
JSON representation
Ansible playbook to configure one more secure Wordpress sites
- Host: GitHub
- URL: https://github.com/spofibo/ansible-wordpress
- Owner: Spofibo
- License: agpl-3.0
- Created: 2022-01-30T16:02:00.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T18:25:18.000Z (almost 2 years ago)
- Last Synced: 2024-04-08T22:07:53.291Z (almost 2 years ago)
- Topics: ansible, ansible-playbook, certbot, cloudflare, nginx, php, vagrant, vagrantfile, wordpress
- Language: Jinja
- Homepage:
- Size: 140 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to ansible-wordpress 👋
[](https://github.com/spofibo/ansible-wordpress#readme)

[](https://github.com/spofibo/ansible-wordpress/graphs/commit-activity)
[](https://github.com/spofibo/ansible-wordpress/blob/master/LICENSE)
> Ansible playbook to deploy one or more Wordpress instances.
It installs and configures Nginx, PHP 8.1, and Certbot for the SSL certificates.
This playbook **does not** install the database service, and instead it expects variables to connect to a remote database.
- For each site the following will get created
- a directory in `/var/www/$NAME` with `www`, `tmp` and `logs` subdirectories
- a user associated to the directory above
- separate php fpm pools
- Uses certbot-dns-cloudflare plugin to validate your domains and generate the ssl certificates
- If you set env=dev it creates self-signed SSL certitifactes
- You can provide a dhparams.pem file in `roles/nginx/files/dhparams.pem` to be copied, or it will generate one for you (it'll take some time though)
## Requirements
- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
- [Cloudflare API token](https://developers.cloudflare.com/api/tokens/create) for the sites you want to manage
### Local testing
- [Virtualbox](https://www.virtualbox.org/wiki/Downloads)
- [Vagrant](https://www.vagrantup.com/downloads)
## Usage
* Copy `vars.example` to `vars.yaml` and update the configuration paramaters
* Copy `inventory.example` to `inventory` and update the `servers` section to figure your targeted servers
* Run
```sh
ansible-playbook -i inventory playbook.yaml
```
### Local Testing
For a complete run:
```sh
vagrant up
```
Targeting specific vars
```sh
vagrant --tags=nginx up
```
Main available tags
- system
- php
- nginx
- certbot
- wordpress
## Author
👤 **Alex Budurovici**
* Website: w0rldart.com
* Github: [@w0rldart](https://github.com/w0rldart)
## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/Spofibo/ansible-wordpress/issues). You can also take a look at the [contributing guide](https://github.com/spofibo/ansible-wordpress/blob/master/CONTRIBUTING.md).
## Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2022 [Alex Budurovici](https://github.com/w0rldart).
This project is [AGPL-3.0-or-later](https://github.com/spofibo/ansible-wordpress/blob/master/LICENSE) licensed.
***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_