- Added variables for pre, post, and deploy renewal hooks in defaults/main.yml.
- Created a new task file tasks/setup-hooks.yml to manage the hooks setup.
- Included setup-hooks.yml in tasks/main.yml to ensure hooks are created if specified.
Due to the certbot package not being really installed on the initial
dry-run the symlink generation fails. The corresponding will be ignored
in check mode.
The command that will create the certificates need the hook script
ansible.sh to exist before it is run, elsewise an error will occur in
case of first run on a new host.
(cherry picked from commit 2346cd52a262bf2fa89419f29abba0e8ea95cdb7)
The PowerTools repo exists only on CentOS, but the current selector ansible_os_family == 'RedHat' also evaluates to true on Fedora and RHEL, making this role fail.
This patch switches the when statement to only evaluate to true if really running on CentOS, which I think was the intention
* Move 'stop' services to pre-hook and post-hook. This way they will also be stopped and started when renewing.
- remove service stop/start tasks
- add pre-hook/post-hook templates
- add pre-hook/pos-hook template tasks
- create missing directories at first run
- run pre and post hook during first manual run
- introduces a variable certbot_from_git
- adds install from package tasks
- makes a variable called certbot_script available (to handle certbot vs certbot-auto naming)
- fixes#18
this is a preparation for installing certbot from package management
additionally, it might be useful when further tasks are added, e.g. for initial certificate retrieval