diff --git a/tasks/main.yml b/tasks/main.yml index 59f9dcbcaa43dd03f5946179372f27ce968fa07b..8d30eb10bc55aad316b6f2f9b366a7423fa47d97 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -29,8 +29,8 @@ import_tasks: 'buildcerts.yml' tags: 'Certs' - when: 'proxy_active is defined and proxy_active and "letsencrypt" not in excluded_roles' + when: 'proxy_active|default(true) and "letsencrypt" not in excluded_roles' - import_tasks: 'proxypool.yml' - when: 'proxy_active is defined and "letsencrypt" not in excluded_roles' + when: '"letsencrypt" not in excluded_roles' tags: 'Certs' diff --git a/tasks/proxypool.yml b/tasks/proxypool.yml index 0ba49fb2c5f7e3d0c63f0dcbe04cd938ff07557d..f1904b8edfd3467e6eeceea9b4bf5fc37b15d5da 100644 --- a/tasks/proxypool.yml +++ b/tasks/proxypool.yml @@ -8,17 +8,17 @@ path: '/etc/letsencrypt' owner: '{{ ansible_env.SUDO_USER }}' recurse: yes - when: proxy_active + when: proxy_active|default(true) - name: "Pull Certs from active Proxy" import_tasks: 'pullcerts.yml' - when: not proxy_active + when: not proxy_active|default(true) - name: "Set directory permissions to root" file: path: '/etc/letsencrypt' owner: 'root' recurse: yes - when: proxy_active + when: proxy_active|default(true) tags: 'Certs'