generated from sebclem/ansible-role-template
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
- name: Ensure dolibar folder exist
|
|
ansible.builtin.file:
|
|
path: "{{ dolibarr_install_dir }}"
|
|
owner: "www-data"
|
|
group: "www-data"
|
|
mode: "755"
|
|
state: directory
|
|
|
|
- name: Download and unzip dolibarr
|
|
ansible.builtin.unarchive:
|
|
remote_src: true
|
|
src: "{{ dolibarr_dowload_url }}"
|
|
dest: "{{ dolibarr_install_dir }}"
|
|
owner: "www-data"
|
|
group: "www-data"
|
|
extra_opts:
|
|
- --strip-components=1
|
|
|
|
- name: Enable apache modules
|
|
community.general.apache2_module:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop: "{{ dolibarr_apache_modules }}"
|
|
|
|
- name: Add dolibarr apache site
|
|
ansible.builtin.template:
|
|
src: dolibarr.conf.j2
|
|
dest: /etc/apache2/sites-available/dolibarr.conf
|
|
mode: "644"
|
|
|
|
- name: Disable default site
|
|
ansible.builtin.file:
|
|
path: "/etc/apache2/sites-enabled/000-default.conf"
|
|
state: absent
|
|
|
|
- name: Enable dolibarr site
|
|
ansible.builtin.file:
|
|
path: "/etc/apache2/sites-enabled/dolibarr.conf"
|
|
src: "/etc/apache2/sites-available/dolibarr.conf"
|
|
state: link
|