diff --git a/.yamllint b/.yamllint index f250868..224e98a 100644 --- a/.yamllint +++ b/.yamllint @@ -13,3 +13,15 @@ rules: allowed-values: ['true', 'false', 'yes', 'no'] braces: max-spaces-inside: 1 + comments: + min-spaces-from-content: 1 # prettier compatibility + # We are adding an extra space inside braces as that's how prettier does it + # and we are trying not to fight other linters. + braces: + min-spaces-inside: 0 # yamllint defaults to 0 + max-spaces-inside: 1 # yamllint defaults to 0 + # key-duplicates: + # forbid-duplicated-merge-keys: true # not enabled by default + octal-values: + forbid-implicit-octal: true # yamllint defaults to false + forbid-explicit-octal: true # yamllint defaults to false \ No newline at end of file diff --git a/README.md b/README.md index e5fc607..57f00f3 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The following table shows every new variable created that differs from `geerling | `certbot_auto_renew` | If you set to `false` it will remove the cronjob if it was previously installed. | | `certbot_create_reload_services` | List of services to reload after each successfully issued certificate. | | `certbot_dns_plugin` | Certbot [DNS Plugin](https://eff-certbot.readthedocs.io/en/stable/using.html#dns-plugins) to use. There is no default. Mandatory. | +| `certbot_create_command_extra_options` | Parameter list that will feed into certbot create command. You can pass any argument. Use at your own risk. | | `certbot_dns_credentials_custom_file` | DNS Credentials File Path. Useful when using unsupported plugin by this role. | | `certbot_dns_*` | Options to choose depending on each plugin, refer to DNS Plugins Variables below. | diff --git a/defaults/main.yml b/defaults/main.yml index 2cb2813..5e547b6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -44,3 +44,6 @@ certbot_create_reload_services: [] # remove brackets if adding services # Where to put Certbot when installing from source. certbot_dir: /opt/certbot + +# Certbot extra args +certbot_create_command_extra_options: "" \ No newline at end of file diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 7490710..3c2f1e5 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -1,14 +1,18 @@ --- +role_name_check: 1 dependency: name: galaxy + options: + ignore-errors: true driver: name: docker platforms: - name: instance - image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" + image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux9}-ansible:latest" command: ${MOLECULE_DOCKER_COMMAND:-""} volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host privileged: true pre_build_image: true provisioner: diff --git a/tasks/prepare-certbot-for-dns.yml b/tasks/prepare-certbot-for-dns.yml index fe45039..7d1a1cc 100644 --- a/tasks/prepare-certbot-for-dns.yml +++ b/tasks/prepare-certbot-for-dns.yml @@ -29,7 +29,7 @@ - name: Upload custom DNS Credentials file. copy: - src: "{{ certbot_dns_credentials_custom_file }}" + src: "{{ certbot_dns_credentials_custom_file }}" dest: "{{ certbot_dns_credentials_file }}" state: file mode: 0600 diff --git a/vars/main.yml b/vars/main.yml index b3aad91..2a313c3 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -18,6 +18,7 @@ certbot_create_command: >- {{ '--deploy-hook /etc/letsencrypt/renewal-hooks/deploy/reload_services.sh' if certbot_create_reload_services else '' }} + {{ certbot_create_command_extra_options }} certbot_delete_command: >- {{ certbot_script }} delete --noninteractive