: introduce webapps playbook to handle web php applications

This commit is contained in:
VC
2025-02-13 17:52:49 +01:00
parent 978319d09d
commit 6f87eb99c6
10 changed files with 178 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
---
- name: Create application directory
ansible.builtin.file:
state: directory
dest: "{{ roundcube_local_path }}"
owner: "root"
group: "www-data"
mode: "0o750"
- name: Unzip roundcube
ansible.builtin.unarchive:
remote_src: true
src: "{{ roundcube_url }}"
dest: "{{ roundcube_local_path }}"
owner: root
group: www-data
mode: "a-rwx,u+rwX,g+rX"
extra_opts: ['--strip-components=1']
exclude:
- "{{ roundcube_config_path }}"
- name: Put roundcube configuration
ansible.builtin.template:
src: "config.inc.php.j2"
dest: "{{ roundcube_config_path }}"
owner: root
group: www-data
mode: "0o640"
- name: Check writable dir
ansible.builtin.file:
state: directory
recurse: true
dest: "{{ roundcube_local_path }}/{{ item }}"
owner: root
group: www-data
mode: "g+w"
loop:
- "logs"
- "temp"