mirror of
https://github.com/nickjj/ansible-acme-sh.git
synced 2024-11-21 10:25:10 +01:00
Allow specifying a list of dependency packages
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
This commit is contained in:
parent
f784b8b8e9
commit
e9fade4a5d
@ -52,6 +52,10 @@ webroot, nginx or Apache but nothing is set in stone.
|
||||
# needs to already exist, this role will not create it.
|
||||
acme_sh_become_user: "root"
|
||||
|
||||
# acme.sh package dependencies. The default values are for Debian / Ubuntu.
|
||||
# For CentOS and Fedora you can replace "cron" with "crond".
|
||||
acme_sh_dependencies: ["cron", "git", "wget"]
|
||||
|
||||
# The acme.sh repo to clone.
|
||||
acme_sh_git_url: "https://github.com/Neilpang/acme.sh"
|
||||
|
||||
@ -275,9 +279,6 @@ acme_sh_domains:
|
||||
# extra_issue_renew_hook: ""
|
||||
# # Optionally remove and disable the certificate.
|
||||
# remove: True
|
||||
|
||||
# How long should the apt-cache last in seconds?
|
||||
acme_sh_apt_cache_time: 86400
|
||||
```
|
||||
|
||||
## Example usage
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
acme_sh_become_user: "root"
|
||||
|
||||
acme_sh_dependencies: ["cron", "git", "wget"]
|
||||
|
||||
acme_sh_git_url: "https://github.com/Neilpang/acme.sh"
|
||||
acme_sh_git_version: "master"
|
||||
acme_sh_git_update: False
|
||||
@ -42,5 +44,3 @@ acme_sh_default_issue_renew_hook: ""
|
||||
acme_sh_default_remove: False
|
||||
|
||||
acme_sh_domains: []
|
||||
|
||||
acme_sh_apt_cache_time: 86400
|
||||
|
@ -1,11 +1,10 @@
|
||||
---
|
||||
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
update_cache: True
|
||||
cache_valid_time: "{{ acme_sh_apt_cache_time }}"
|
||||
loop: ["cron", "git", "wget"]
|
||||
state: "present"
|
||||
loop: "{{ acme_sh_dependencies }}"
|
||||
when: not acme_sh_uninstall
|
||||
|
||||
- name: Create git clone path
|
||||
|
@ -14,6 +14,11 @@
|
||||
name: "{{ acme_sh_become_user }}"
|
||||
shell: "/bin/bash"
|
||||
|
||||
- name: Run the equivalent of "apt-get update"
|
||||
apt:
|
||||
update_cache: true
|
||||
changed_when: false
|
||||
|
||||
post_tasks:
|
||||
- name: Ensure acme.sh was cloned
|
||||
command: test -d /usr/local/src/acme.sh
|
||||
|
Loading…
Reference in New Issue
Block a user