diff --git a/tasks/main.yaml b/tasks/main.yaml index 7b04bda..d6e331e 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -1,4 +1,7 @@ --- +- name: Install packages + include_tasks: packages.yaml + - name: Create Apache2 config include_tasks: apache2_template.yaml when: not nextcloud_nginx diff --git a/tasks/packages.yaml b/tasks/packages.yaml new file mode 100644 index 0000000..fc1b237 --- /dev/null +++ b/tasks/packages.yaml @@ -0,0 +1,33 @@ +--- +- name: Ensure Apache2 package is installed + ansible.builtin.package: + name: apache2 + state: present + when: not nextcloud_nginx + +- name: Ensure nginx package is installed + ansible.builtin.package: + name: nginx + state: present + when: nextcloud_nginx + +- name: Ensure PHP package is installed + ansible.builtin.package: + name: php + state: present + +- name: Ensure PHP module packages are installed + ansible.builtin.package: + name: "{{ item }}" + state: present + with_items: + - php-fpm + - php-curl + - php-xml + - php-gd + - php-mbstring + - php-zip + - php-mysql + - php-pgsql + - php-bz2 + - php-redis