Ensure /var/www/chat directory exists
This commit is contained in:
parent
63944f4023
commit
8e4c55a82e
1 changed files with 12 additions and 10 deletions
|
|
@ -3,21 +3,25 @@
|
||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
tasks:
|
tasks:
|
||||||
- name: Ensure previous keanu-weblite temp directory is removed
|
|
||||||
file:
|
|
||||||
path: /tmp/keanu-weblite
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Download pre-built keanu archive
|
- name: Download pre-built keanu archive
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://guardianproject.dev/api/packages/butter/generic/keanu-weblite/latest/keanu-weblite-dev.tar.gz"
|
url: "https://guardianproject.dev/api/packages/butter/generic/keanu-weblite/latest/keanu-weblite-dev.tar.gz"
|
||||||
dest: /tmp
|
dest: /tmp
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: Create keanu-weblite web directory
|
||||||
|
file:
|
||||||
|
path: "/var/www/html/chat"
|
||||||
|
state: directory
|
||||||
|
owner: www-data
|
||||||
|
group: www-data
|
||||||
|
mode: '0755'
|
||||||
|
recurse: yes
|
||||||
|
|
||||||
- name: Untar keanu-weblite
|
- name: Untar keanu-weblite
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "/tmp/keanu-weblite-main.tar.gz"
|
src: "/tmp/keanu-weblite-dev.tar.gz"
|
||||||
dest: "/var/www/html/chat"
|
dest: "/var/www/html/chat/"
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
extra_opts: [--strip-components=1]
|
extra_opts: [--strip-components=1]
|
||||||
|
|
||||||
|
|
@ -26,14 +30,12 @@
|
||||||
url: "{{ config_base_url }}/keanu-weblite-config.json"
|
url: "{{ config_base_url }}/keanu-weblite-config.json"
|
||||||
dest: /var/www/html/chat/config.json
|
dest: /var/www/html/chat/config.json
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
delegate_to: localhost
|
|
||||||
|
|
||||||
- name: Replace REPLACEME with butter_name in config.json
|
- name: Replace REPLACEME with butter_name in config.json
|
||||||
replace:
|
replace:
|
||||||
path: /tmp/keanu-weblite/src/assets/config.json
|
path: /var/www/html/chat/config.json
|
||||||
regexp: 'REPLACEME'
|
regexp: 'REPLACEME'
|
||||||
replace: "{{ butter_name }}"
|
replace: "{{ butter_name }}"
|
||||||
delegate_to: localhost
|
|
||||||
|
|
||||||
- name: Set permissions for /var/www/html/chat
|
- name: Set permissions for /var/www/html/chat
|
||||||
become: true
|
become: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue