You've already forked ansible-directadmin
* Bring role up to spec (2.5+) and introduce LetsEncrypt support * Add Debian 9 support and fix script args chdir * Use correct schema for travis and use command instead of script * Make use of requirements.txt for build and fix syntax * Got better at reading the docs now * Minor improvements
23 lines
836 B
YAML
23 lines
836 B
YAML
---
|
|
- name: execute LetsEncrypt setup script
|
|
command: letsencrypt.sh request_single {{ directadmin_hostname }} 4096
|
|
args:
|
|
chdir: /usr/local/directadmin/scripts/
|
|
register: directadmin_letsencrypt_output
|
|
|
|
- debug:
|
|
var: directadmin_letsencrypt_output.stdout_lines
|
|
|
|
- name: enable SSL with LetsEncrypt for DirectAdmin
|
|
lineinfile:
|
|
path: directadmin_config_path
|
|
regexp: item.regexp
|
|
line: item.line
|
|
with_items:
|
|
- { regexp: '^SSL\=0' , line: 'SSL=1' }
|
|
- { regexp: '^carootcert=' , line: 'carootcert=/usr/local/directadmin/conf/carootcert.pem' }
|
|
- { regexp: '^force_hostname=' , line: "force_hostname={{ directadmin_hostname }}" }
|
|
- { regexp: '^ssl_redirect_host=' , line: "ssl_redirect_host={{ directadmin_hostname }}" }
|
|
- { regexp: '^letsencrypt=' , line: "letsencrypt=1" }
|
|
notify:
|
|
- restart directadmin |