Skip to content

Commit

Permalink
added certbot_create_command_extra_options - issue #4
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobenchimol committed Nov 17, 2024
1 parent 30f1ba5 commit 543f7a9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Check failure on line 20 in .yamllint

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[key-duplicates]

Duplication of key "braces" in mapping

Check failure on line 20 in .yamllint

View workflow job for this annotation

GitHub Actions / YAML Lint

20:3 [key-duplicates] duplication of key "braces" in mapping
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

Check failure on line 27 in .yamllint

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[new-line-at-end-of-file]

No new line character at the end of file

Check failure on line 27 in .yamllint

View workflow job for this annotation

GitHub Actions / YAML Lint

27:61 [new-line-at-end-of-file] no new line character at the end of file
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |

Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""

Check failure on line 49 in defaults/main.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

yaml[new-line-at-end-of-file]

No new line character at the end of file

Check failure on line 49 in defaults/main.yml

View workflow job for this annotation

GitHub Actions / YAML Lint

49:41 [new-line-at-end-of-file] no new line character at the end of file
8 changes: 6 additions & 2 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tasks/prepare-certbot-for-dns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 35 in tasks/prepare-certbot-for-dns.yml

View workflow job for this annotation

GitHub Actions / YAML Lint

35:15 [octal-values] forbidden implicit octal value "0600"
Expand Down
1 change: 1 addition & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 543f7a9

Please sign in to comment.