]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/debian/add-apache-vhost/tasks/dehydrated.yml
Refactor: Move OS-specific roles under common `roles/`
[ansible.git] / playbooks / roles / debian / add-apache-vhost / tasks / dehydrated.yml
diff --git a/playbooks/roles/debian/add-apache-vhost/tasks/dehydrated.yml b/playbooks/roles/debian/add-apache-vhost/tasks/dehydrated.yml
new file mode 100644 (file)
index 0000000..cfd8725
--- /dev/null
@@ -0,0 +1,29 @@
+- name: Create dehydrated directory
+  become: true
+  file:
+    path: "/usr/local/apache2/.dehydrated/{{ virtual_host }}"
+    state: directory
+    owner: root
+    group: root
+    mode: '0700'
+
+- name: Configure dehydrated
+  become: true
+  template:
+    src: "dehydrated/{{ item }}"
+    dest: "/usr/local/apache2/.dehydrated/{{ virtual_host }}"
+    owner: root
+    group: root
+    mode: '0600'
+    force: no
+  loop: ['config', 'domains.txt']
+
+- name: Configure dehydrated script
+  become: true
+  copy:
+    src: dehydrated
+    dest: "/usr/local/apache2/.dehydrated/{{ virtual_host }}"
+    owner: root
+    group: root
+    mode: '0700'
+    force: no