2020-02-07 07:42:30 +00:00
|
|
|
---
|
2020-10-09 15:27:44 +00:00
|
|
|
- hosts: db
|
|
|
|
become: true
|
2020-02-07 07:42:30 +00:00
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- vars/vars.yml
|
2020-10-09 15:27:44 +00:00
|
|
|
- vars/provision_vault.yml
|
2020-02-07 07:42:30 +00:00
|
|
|
- vars/provision_vars.yml
|
|
|
|
|
2020-10-09 15:27:44 +00:00
|
|
|
vars:
|
|
|
|
firewall_additional_rules:
|
|
|
|
- "iptables -A INPUT -p tcp --dport 3306 -s 10.131.0.2 -j ACCEPT"
|
|
|
|
firewall_allowed_tcp_ports: [2849]
|
|
|
|
mysql_bind_address: '10.131.0.3'
|
|
|
|
mysql_users:
|
|
|
|
- name: "{{ app_mysql_user }}"
|
|
|
|
password: "{{ app_mysql_password }}"
|
|
|
|
host: '10.131.0.2'
|
|
|
|
priv: "oliverdavies_uk.*:ALL"
|
|
|
|
mysql_databases:
|
|
|
|
- name: oliverdavies_uk
|
|
|
|
|
|
|
|
pre_tasks:
|
|
|
|
- name: Update apt cache
|
|
|
|
apt:
|
|
|
|
update_cache: true
|
|
|
|
cache_valid_time: 3600
|
|
|
|
|
2020-02-07 07:42:30 +00:00
|
|
|
roles:
|
|
|
|
- name: geerlingguy.firewall
|
|
|
|
- name: geerlingguy.security
|
|
|
|
- name: geerlingguy.mysql
|
2020-10-09 15:27:44 +00:00
|
|
|
|
|
|
|
- hosts: web
|
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- vars/vars.yml
|
|
|
|
- vars/provision_vault.yml
|
|
|
|
- vars/provision_vars.yml
|
|
|
|
|
|
|
|
vars:
|
2021-01-07 20:32:20 +00:00
|
|
|
composer_version_branch: '--1'
|
2020-10-09 15:27:44 +00:00
|
|
|
firewall_allowed_tcp_ports: [80, 443, 2849]
|
|
|
|
mysql_packages:
|
|
|
|
- mariadb-client
|
|
|
|
mysql_users: []
|
|
|
|
|
|
|
|
roles:
|
|
|
|
- name: geerlingguy.firewall
|
|
|
|
- name: geerlingguy.security
|
|
|
|
- name: geerlingguy.certbot
|
2020-02-07 07:42:30 +00:00
|
|
|
- name: geerlingguy.nginx
|
2020-10-09 15:27:44 +00:00
|
|
|
- name: geerlingguy.mysql
|
2020-02-07 07:42:30 +00:00
|
|
|
- name: geerlingguy.php-versions
|
|
|
|
- name: geerlingguy.php
|
2020-10-09 15:27:44 +00:00
|
|
|
- name: geerlingguy.php-mysql
|
2020-02-07 07:42:30 +00:00
|
|
|
- name: geerlingguy.composer
|
2020-05-14 11:04:35 +00:00
|
|
|
- name: geerlingguy.nodejs
|
2020-10-09 15:27:44 +00:00
|
|
|
|
|
|
|
pre_tasks:
|
|
|
|
- name: Update apt cache
|
|
|
|
apt:
|
|
|
|
update_cache: true
|
|
|
|
cache_valid_time: 3600
|
2020-02-07 07:42:30 +00:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: Install packages
|
|
|
|
package:
|
|
|
|
name: [curl, zip]
|
|
|
|
state: present
|
2020-05-19 00:33:55 +00:00
|
|
|
|
|
|
|
- name: Add cron jobs
|
|
|
|
cron:
|
|
|
|
name: Drupal cron - oliverdavies.uk
|
|
|
|
minute: '*/5'
|
|
|
|
job: >
|
2020-12-24 11:00:51 +00:00
|
|
|
{{ project_root_path }}/{{ ansistrano_current_dir }}/bin/drush core-cron
|
2020-05-19 00:33:55 +00:00
|
|
|
--root={{ project_root_path }}/{{ ansistrano_current_dir }}/{{ project_web_dir }}
|
|
|
|
--uri https://www.oliverdavies.uk
|
|
|
|
--quiet
|