Skip to content

Commit

Permalink
feat(pip): allow plugin installation
Browse files Browse the repository at this point in the history
Can now give a list of plugins to install when using the pip
installation method.
  • Loading branch information
Xeryus Stokkel committed Aug 3, 2021
1 parent 756a272 commit ea3b3e0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions letsencrypt/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ letsencrypt:
user: root
group: root
mode: 755
# Only used for the pip install method (install_method = pip). Can be used to
# install plugins for certbot.
pip_pkgs: []
config:
server: https://acme-v02.api.letsencrypt.org/directory
agree-tos: true
Expand Down
3 changes: 3 additions & 0 deletions letsencrypt/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@ letsencrypt-client:
{%- else %}
- certbot
{%- endif %}
{%- for pkg in letsencrypt.pip_pkgs %}
- {{ pkg }}
{%- endfor %}
{%- endif %}
- reload_modules: True
5 changes: 5 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ letsencrypt:
# If you want to have specific version of certbot you can enable it. The
# version value should match a certbot/certbot branch.
version: 0.30.x
# Only used for the pip install method (install_method = pip). Can be used to
# install plugins for certbot. Default: []
pip_pkgs:
- certbot-dns-azure
- certbot-dns-powerdns
# Subcommand used for certificates' first generation cmd ( run | certonly | renew )
create_init_cert_subcmd: certonly
# Any parameter from the cli can be specified in the config file
Expand Down
4 changes: 4 additions & 0 deletions test/integration/pip/controls/letsencrypt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
its('content') { should match 'authenticator = standalone' }
its('content') { should match 'File managed by Salt' }
end

describe command('/opt/letsencrypt/bin/certbot plugins') do
its('stdout') { should match(/dns-powerdns/) }
end
4 changes: 3 additions & 1 deletion test/salt/pillar/pip.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
---
letsencrypt:
install_method: pip
version: 0.26.1
version: 1.7.0
pip_pkgs:
- certbot-dns-powerdns
config: |
server = https://acme-staging.api.letsencrypt.org/directory
email = saltstack-letsencrypt-formula@example.com
Expand Down

0 comments on commit ea3b3e0

Please sign in to comment.