forked from geerlingguy/drupal-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
86 lines (73 loc) · 3.25 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
- hosts: all
become: yes
vars_files:
- vars/main.yml
- ../config.yml
pre_tasks:
- include: tasks/init-debian.yml
when: ansible_os_family == 'Debian'
- include: tasks/init-redhat.yml
when: ansible_os_family == 'RedHat'
- name: Set the PHP webserver daemon correctly when nginx is in use.
set_fact:
php_webserver_daemon: nginx
when: drupalvm_webserver == 'nginx'
roles:
# Essential roles.
- { role: geerlingguy.repo-remi, when: ansible_os_family == 'RedHat' }
- geerlingguy.firewall
- geerlingguy.git
- geerlingguy.postfix
- { role: geerlingguy.apache, when: drupalvm_webserver == 'apache' }
- { role: geerlingguy.apache-php-fpm, when: drupalvm_webserver == 'apache' }
- { role: geerlingguy.nginx, when: drupalvm_webserver == 'nginx' }
- geerlingguy.mysql
- geerlingguy.php
- geerlingguy.php-pecl
- geerlingguy.php-mysql
- geerlingguy.composer
- geerlingguy.drush
# Conditionally-installed roles.
- { role: geerlingguy.drupal-console, when: 'drupal_major_version > 7 and "drupalconsole" in installed_extras' }
- { role: geerlingguy.memcached, when: '"memcached" in installed_extras' }
- { role: geerlingguy.php-memcached, when: '"memcached" in installed_extras' }
- { role: geerlingguy.php-xdebug, when: '"xdebug" in installed_extras' }
- { role: geerlingguy.php-xhprof, when: '"xhprof" in installed_extras' }
- { role: geerlingguy.adminer, when: '"adminer" in installed_extras' }
- { role: geerlingguy.pimpmylog, when: '"pimpmylog" in installed_extras' }
- { role: geerlingguy.daemonize, when: '"mailhog" in installed_extras' }
- { role: geerlingguy.mailhog, when: '"mailhog" in installed_extras' }
- { role: geerlingguy.nodejs, when: '"nodejs" in installed_extras' }
- { role: geerlingguy.redis, when: '"redis" in installed_extras' }
- { role: geerlingguy.php-redis, when: '"redis" in installed_extras' }
- { role: geerlingguy.ruby, when: '"ruby" in installed_extras' }
- { role: geerlingguy.java, when: '"solr" in installed_extras or "selenium" in installed_extras' }
- { role: arknoll.selenium, when: '"selenium" in installed_extras' }
- { role: geerlingguy.solr, when: '"solr" in installed_extras' }
- { role: geerlingguy.varnish, when: '"varnish" in installed_extras' }
# Roles for security and stability on production.
- { role: geerlingguy.security, when: extra_security_enabled }
tasks:
- name: Check if Drupal is already set up.
stat: "path={{ drupal_core_path }}/index.php"
register: drupal_site
- include: tasks/sshd.yml
- include: tasks/extras.yml
- include: tasks/www.yml
- include: tasks/apparmor.yml
when: ansible_os_family == 'Debian'
# Build makefile if configured.
- include: tasks/build-makefile.yml
when: build_makefile
# Install site if configured.
- include: tasks/install-site.yml
when: install_site
- include: tasks/drush-aliases.yml
- include: tasks/cron.yml
- include: tasks/dashboard.yml
when: dashboard_install_dir is defined
- name: Run configured post-provision shell scripts.
script: "{{ item }}"
with_items: post_provision_scripts
when: post_provision_scripts is defined