]> arthur.barton.de Git - AnsibleRoles.git/commitdiff
New "apache2-php7" role
authorAlexander Barton <alex@barton.de>
Mon, 23 Oct 2017 12:10:03 +0000 (14:10 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 23 Oct 2017 12:10:03 +0000 (14:10 +0200)
roles/apache2-php7/meta/main.yml [new file with mode: 0644]
roles/apache2-php7/tasks/main.yml [new file with mode: 0644]

diff --git a/roles/apache2-php7/meta/main.yml b/roles/apache2-php7/meta/main.yml
new file mode 100644 (file)
index 0000000..c369c21
--- /dev/null
@@ -0,0 +1,5 @@
+---
+# apache2-php7 meta
+
+dependencies:
+  - { role: apache2 }
diff --git a/roles/apache2-php7/tasks/main.yml b/roles/apache2-php7/tasks/main.yml
new file mode 100644 (file)
index 0000000..47eaa91
--- /dev/null
@@ -0,0 +1,26 @@
+---
+# apache2-php7 tasks
+
+- name: install packages for Apache 2 with PHP 7
+  tags:
+    - apache
+    - packages
+  apt: >
+    state=installed
+    name={{ item }}
+  with_items:
+    - libapache2-mod-php
+    - php
+    - php-cli
+    - php-mysql
+  notify:
+    - restart "apache2"
+
+- name: ensure service "apache2" is enabled and started
+  tags:
+    - apache
+    - services
+  service: >
+    enabled=yes
+    name=apache2
+    state=started