mise au point
This commit is contained in:
@@ -32,6 +32,7 @@ apache_ssl_key: /etc/letsencrypt/live/{{ apache_server_name }}/privkey.pem
|
|||||||
apache_user: {{ apache_server_name | regex_search( '([^.]+)' ) }} }}
|
apache_user: {{ apache_server_name | regex_search( '([^.]+)' ) }} }}
|
||||||
apache_allowoverride: all
|
apache_allowoverride: all
|
||||||
apache_update_conf: true - wether we override existing config file
|
apache_update_conf: true - wether we override existing config file
|
||||||
|
apache_ssl_root_email: email used for letsencrypt certificate
|
||||||
|
|
||||||
Example Playbook
|
Example Playbook
|
||||||
----------------
|
----------------
|
||||||
|
|||||||
@@ -15,5 +15,5 @@ apache_use_php: true
|
|||||||
apache_use_ssl: true
|
apache_use_ssl: true
|
||||||
apache_use_stats: true
|
apache_use_stats: true
|
||||||
apache_use_zabbix: true
|
apache_use_zabbix: true
|
||||||
apache_user: "{{ apache_server_name | regex_search( '([^.]+)' ) }} }}"
|
apache_user: "{{ apache_server_name | regex_search( '([^.]+)' ) }}"
|
||||||
apache_update_conf: true
|
apache_update_conf: true
|
||||||
|
|||||||
@@ -24,13 +24,13 @@
|
|||||||
- name: generate certificates for domaine and subdomains
|
- name: generate certificates for domaine and subdomains
|
||||||
vars:
|
vars:
|
||||||
subdomains: "-d {{ apache_server_alias | join( ' -d ' ) }}"
|
subdomains: "-d {{ apache_server_alias | join( ' -d ' ) }}"
|
||||||
command: certbot certonly --agree-tos -m {{ apache_ssl_root_email }} --webroot --webroot-path {{ apache_document_root }} -d {{ apache_server_name }} {{ subdomains }}
|
command: certbot certonly --agree-tos --non-interactive -m {{ apache_ssl_root_email }} --webroot --webroot-path {{ apache_document_root }} -d {{ apache_server_name }} {{ subdomains }}
|
||||||
args:
|
args:
|
||||||
creates: "{{ apache_ssl_chain }}"
|
creates: "{{ apache_ssl_chain }}"
|
||||||
when: apache_server_alias is defined
|
when: apache_server_alias is defined
|
||||||
|
|
||||||
- name: generate certificates
|
- name: generate certificates
|
||||||
command: certbot certonly --agree-tos -m {{ apache_ssl_root_email }} --webroot --webroot-path {{ apache_document_root }} -d {{ apache_server_name }}
|
command: certbot certonly --agree-tos --non-interactive -m {{ apache_ssl_root_email }} --webroot --webroot-path {{ apache_document_root }} -d {{ apache_server_name }}
|
||||||
args:
|
args:
|
||||||
creates: "{{ apache_ssl_chain }}"
|
creates: "{{ apache_ssl_chain }}"
|
||||||
when: apache_server_alias is not defined
|
when: apache_server_alias is not defined
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
- apache
|
- apache
|
||||||
home: "{{ apache_base_dir }}"
|
home: "{{ apache_base_dir }}"
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
when: apache_user_password is not defined
|
when: apache_user_password is not defined and apache_user != 'apache'
|
||||||
|
|
||||||
- name: create dedicated user - ssh
|
- name: create dedicated user - ssh
|
||||||
tags: wip
|
tags: wip
|
||||||
|
|||||||
Reference in New Issue
Block a user