oliverdavies.uk-drupal-old/tools/ansible/provision.yml

81 lines
1.9 KiB
YAML
Raw Normal View History

2020-02-07 07:42:30 +00:00
---
- hosts: db
become: true
2020-02-07 07:42:30 +00:00
vars_files:
- vars/vars.yml
- vars/provision_vault.yml
2020-02-07 07:42:30 +00:00
- vars/provision_vars.yml
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
- hosts: web
vars_files:
- vars/vars.yml
- vars/provision_vault.yml
- vars/provision_vars.yml
vars:
composer_version_branch: '--1'
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
- name: geerlingguy.mysql
2020-02-07 07:42:30 +00:00
- name: geerlingguy.php-versions
- name: geerlingguy.php
- name: geerlingguy.php-mysql
2020-02-07 07:42:30 +00:00
- name: geerlingguy.composer
- name: geerlingguy.nodejs
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: >
{{ project_root_path }}/{{ ansistrano_current_dir }}/vendor/bin/drush core-cron
--root={{ project_root_path }}/{{ ansistrano_current_dir }}/{{ project_web_dir }}
--uri https://www.oliverdavies.uk
--quiet