Skip to content

Ensure required WordfFence files exist in shared directory

License

Notifications You must be signed in to change notification settings

ItinerisLtd/trellis-wordfence-kinsta

Repository files navigation

trellis-wordfence-kinsta

GitHub tag license

Ensure required WordfFence files exist in shared directory.

Requirements

  • Trellis 6b40320 or later
  • Ansible v2.6 or later
  • Bedrock
  • WordFence

Installation

Add this role to galaxy.yml:

# galaxy.yml
- src: https://github.com/ItinerisLtd/trellis-wordfence-kinsta
  version: x.x.x # Check for latest version!

Run the command:

trellis galaxy install

# Alternatively
ansible-galaxy install -r galaxy.yml --force

Role Variables

  1. Add this role to the deploy_after hook:
    # group_vars/all/deploy-hooks.yml
    # Learn more on https://roots.io/trellis/docs/deploys/#hooks
    deploy_finalize_after:
      - "{{ playbook_dir }}/vendor/roles/itinerisltd.trellis-wordfence-kinsta/tasks/main.yml"

Usage

  1. Setup the role variables
  2. Deploy
  3. Tell Kinsta to add the auto_prepend_file variable that points to {{ deploy_helper.current_path }}/config/wordfence-waf.php
    1. deploy_helper.shared_path can differ between Trellis setups. Check for final path before asking Kinsta.
    2. This is the path to the Bedrock/Radicle configs.
    3. E.g. auto_prepend_file = '/www/kinstauser_123/public/current/config/wordfence-waf.php'

FAQs

WordFence still complains that the firewall is not configured!

Do not forget to tell Kinsta to add the auto_prepend_file variable.

Testing

Syntax Check

➜ ansible-playbook -i 'localhost,' --syntax-check tests/test.yml

Author Information

trellis-wordfence-kinsta is an Itineris Limited project created by Lee Hanbury-Pickett.

Special thanks to the Roots team whose Trellis make this project possible.

Full list of contributors can be found here.

Feedback

Please provide feedback! We want to make this library useful in as many projects as possible. Please submit an issue and point out what you do and don't like, or fork the project and make suggestions. No issue is too small.

Change log

Please see CHANGELOG for more information on what has changed recently.

License

trellis-wordfence-kinsta is released under the MIT License.