This guide deploys SPF Toolbox as a PHP web application for DNS/SPF diagnostics.
- name: Install SPF Toolbox on Debian family
hosts: spf_toolbox_debian
become: true
vars:
spf_toolbox_web_root: /var/www/spf-toolbox
spf_toolbox_repo: "https://github.com/charlesabarnes/SPFtoolbox.git"
spf_toolbox_version: "master"
tasks:
- name: Install dependencies
ansible.builtin.apt:
update_cache: true
name:
- apache2
- php
- php-cli
- php-curl
- php-xml
- git
state: present
- name: Clone SPF Toolbox repository
ansible.builtin.git:
repo: "{{ spf_toolbox_repo }}"
dest: "{{ spf_toolbox_web_root }}"
version: "{{ spf_toolbox_version }}"
force: false
failed_when: false
- name: Set ownership for web root
ansible.builtin.file:
path: "{{ spf_toolbox_web_root }}"
state: directory
recurse: true
owner: www-data
group: www-data
- name: Enable and start Apache
ansible.builtin.systemd:
name: apache2
enabled: true
state: started
- name: Install SPF Toolbox on RHEL family
hosts: spf_toolbox_rhel
become: true
vars:
spf_toolbox_web_root: /var/www/html/spf-toolbox
spf_toolbox_repo: "https://github.com/charlesabarnes/SPFtoolbox.git"
spf_toolbox_version: "master"
tasks:
- name: Install dependencies
ansible.builtin.dnf:
name:
- httpd
- php
- php-cli
- php-curl
- php-xml
- git
state: present
- name: Clone SPF Toolbox repository
ansible.builtin.git:
repo: "{{ spf_toolbox_repo }}"
dest: "{{ spf_toolbox_web_root }}"
version: "{{ spf_toolbox_version }}"
force: false
failed_when: false
- name: Set ownership for web root
ansible.builtin.file:
path: "{{ spf_toolbox_web_root }}"
state: directory
recurse: true
owner: apache
group: apache
- name: Enable and start Apache
ansible.builtin.systemd:
name: httpd
enabled: true
state: started
ansible-playbook -i inventory.ini spf-toolbox-install.yml
spf_toolbox_debian.Need help automating SPF, DKIM, and DMARC deployments? We provide consulting for email authentication setups, DNS record automation, and deliverability troubleshooting. Contact office@linux-server-admin.com or visit our contact page.