diff --git a/tasks/install.yml b/tasks/install.yml index 31b99d26e55c8bb5b8e4c35cfa4ca1166a5bf516..b1f1075529d997c021231494f259033448e7aa51 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -18,9 +18,13 @@ state: 'present' update_cache: yes -- name: "" +- name: "Force certbot to use Python 3" lineinfile: - path: '/usr/local/bin/certbot' + path: '{{ item }}' regexp: '^#!/usr/bin/python$' line: '#!/usr/bin/python3' + with_items: + - '/usr/local/bin/certbot' + - '/usr/bin/certbot' ignore_errors: yes + failed_when: false