From 63f707e866b93d32d87a7c3e7ba1389e67520979 Mon Sep 17 00:00:00 2001 From: Corbin Bartsch Date: Sun, 10 Apr 2022 17:05:12 -0400 Subject: [PATCH] Add tasks to install packages --- tasks/main.yaml | 3 +++ tasks/packages.yaml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tasks/packages.yaml 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