-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-application.yml
51 lines (46 loc) · 1.37 KB
/
install-application.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
---
- name: Application install ({{item.path}}) - root folder
ansible.builtin.file:
path: "{{item.path}}"
state: directory
mode: '2775'
owner: www-data
group: www-data
- name: Application install ({{item.path}}) - Git checkout
become: true
become_user: www-data
become_method: sudo
ansible.builtin.git:
repo: https://github.com/enwikipedia-acc/waca.git
dest: "{{item.path}}"
refspec: "pull/969/head"
version: "{{app_version}}"
recursive: false
accept_hostkey: true
force: yes
- name: Application install ({{item.path}}) - Install composer dependencies
become: true
become_user: www-data
become_method: sudo
ansible.builtin.shell:
cmd: bash -l -c 'export COMPOSER_HOME=/tmp; composer install'
chdir: "{{item.path}}/"
- name: Application install ({{item.path}}) - Install npm dependencies
become: true
become_user: www-data
become_method: sudo
ansible.builtin.shell:
cmd: bash -l -c 'npm i'
chdir: "{{item.path}}/"
- name: Application install ({{item.path}}) - Regenerate stylesheets
become: true
become_user: www-data
become_method: sudo
ansible.builtin.shell:
cmd: bash -l -c 'npm run build-scss'
chdir: "{{item.path}}/"
- name: Application install ({{item.path}}) - configuration
ansible.builtin.file:
path: "{{item.path}}/config.local.inc.php"
state: link
src: "{{item.config}}"