From 998c2ff4dc6b979e6f030f7083b3cefc47244dde Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 18 Sep 2019 16:37:54 +0200 Subject: [PATCH] add missing epel dependency --- defaults/main.yml | 2 ++ molecule/ec2-centos-7/playbook.yml | 2 +- tasks/install.yml | 23 +++++++++++++---------- vars/main.yml | 3 +++ 4 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 vars/main.yml diff --git a/defaults/main.yml b/defaults/main.yml index ff5e70b..8e8456a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,4 +1,6 @@ --- +certbot_packages_extra: [] + certbot_initial_run_enabled: False certbot_work_dir: /var/lib/letsencrypt certbot_config_dir: /etc/letsencrypt diff --git a/molecule/ec2-centos-7/playbook.yml b/molecule/ec2-centos-7/playbook.yml index f88e33b..bd3ac25 100644 --- a/molecule/ec2-centos-7/playbook.yml +++ b/molecule/ec2-centos-7/playbook.yml @@ -2,7 +2,7 @@ - name: Converge hosts: all vars: - python3_packages_extra: + certbot_packages_extra: - epel-release roles: diff --git a/tasks/install.yml b/tasks/install.yml index 9d3792a..42299b4 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,18 +1,21 @@ --- -- name: Create certbot user '{{ certbot_user }}' - user: - name: "{{ certbot_user }}" - become: True - become_user: root - when: not certbot_user == 'root' - -- name: Deploy certbot - block: +- block: - name: Install certbot package: - name: certbot + name: "{{ item }}" state: present + loop: "{{ certbot_packages_extra + __certbot_packages }}" + - name: Create certbot user '{{ certbot_user }}' + user: + name: "{{ certbot_user }}" + become: True + become_user: root + when: not certbot_user == 'root' + become: True + become_user: root + +- block: - name: Create certbot environment file: path: "{{ item.name }}" diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..2dd2a42 --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,3 @@ +--- +__certbot_packages: + - certbot