Install git if we use it to download and install acme.sh. Install the git distribution into its own subdirectory.

This commit is contained in:
Andrea Dell'Amico 2018-08-20 19:50:16 +02:00
parent dd2b1e1648
commit a6368ff167
3 changed files with 7 additions and 2 deletions

View File

@ -6,7 +6,7 @@ else
exit 1 exit 1
fi fi
cd "$ACME_SH_HOME" cd "$ACME_SH_GIT_DIST_DIR"
./acme.sh $ACME_SH_INSTALL_OPTS ./acme.sh $ACME_SH_INSTALL_OPTS
exit $? exit $?

View File

@ -1,5 +1,9 @@
--- ---
- block: - block:
- name: Install the git client if we are installing using git
apt: pkg=git update_cache=yes cache_valid_time=1800
when: letsencrypt_acme_sh_git_install
- name: Create the letsencrypt acme user - name: Create the letsencrypt acme user
user: name={{ letsencrypt_acme_sh_user }} home={{ letsencrypt_acme_sh_user_home }} createhome=no shell=/usr/sbin/nologin system=yes user: name={{ letsencrypt_acme_sh_user }} home={{ letsencrypt_acme_sh_user_home }} createhome=no shell=/usr/sbin/nologin system=yes
tags: [ 'letsencrypt', 'letsencrypt_user' ] tags: [ 'letsencrypt', 'letsencrypt_user' ]
@ -35,7 +39,7 @@
- block: - block:
- name: Download the acme.sh distribution - name: Download the acme.sh distribution
git: repo={{ letsencrypt_acme_sh_git_url }} dest={{ letsencrypt_acme_sh_user_home }} recursive=yes update=yes git: repo={{ letsencrypt_acme_sh_git_url }} dest={{ letsencrypt_acme_git_dest_dir }} recursive=yes update=yes
- name: Create the letsencrypt acme.sh directory tree - name: Create the letsencrypt acme.sh directory tree
file: dest={{ item }} state=directory mode=0755 file: dest={{ item }} state=directory mode=0755

View File

@ -9,6 +9,7 @@ ACME_SH_ENV_FILE=${ACME_SH_BINDIR}/acme.sh.env
ACME_SH_ISSUE_LOG_FILE={{ letsencrypt_acme_sh_base_data_dir }}/logs/cert_issue.log ACME_SH_ISSUE_LOG_FILE={{ letsencrypt_acme_sh_base_data_dir }}/logs/cert_issue.log
ACME_SH_CRON_LOG_FILE={{ letsencrypt_acme_sh_base_data_dir }}/logs/cron.log ACME_SH_CRON_LOG_FILE={{ letsencrypt_acme_sh_base_data_dir }}/logs/cron.log
ACME_SH_INSTALL_LOG_FILE={{ letsencrypt_acme_sh_log_dir }}/cert_install.log ACME_SH_INSTALL_LOG_FILE={{ letsencrypt_acme_sh_log_dir }}/cert_install.log
ACME_SH_GIT_DIST_DIR={{ letsencrypt_acme_git_dest_dir }}
ACME_SH_INSTALL_CERTS={{ letsencrypt_acme_sh_explicitly_install_certs }} ACME_SH_INSTALL_CERTS={{ letsencrypt_acme_sh_explicitly_install_certs }}