summaryrefslogtreecommitdiff
path: root/roles/acmetool/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/acmetool/tasks/main.yml')
-rw-r--r--roles/acmetool/tasks/main.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/acmetool/tasks/main.yml b/roles/acmetool/tasks/main.yml
new file mode 100644
index 00000000..c2fc2c6c
--- /dev/null
+++ b/roles/acmetool/tasks/main.yml
@@ -0,0 +1,25 @@
+---
+- name: check if acmetool package is new enough
+ debug:
+ msg: "Check distribution_release"
+ failed_when: (ansible_distribution == 'Debian' and ansible_distribution_major_version < 9) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version < 17) or (ansible_distribution != 'Debian' and ansible_distribution != 'Ubuntu')
+
+- name: install acmetool
+ apt:
+ name: acmetool
+ state: present
+
+- name: create initial directory structure
+ command: acmetool --batch
+ args:
+ creates: /var/lib/acme/conf
+
+- name: create acmetool response file
+ template:
+ src: responses.j2
+ dest: /var/lib/acme/conf/responses
+
+- name: run quickstart to create account and default target configuration
+ command: acmetool --batch quickstart
+ args:
+ creates: /var/lib/acme/conf/target