make it work on debian

remove certbot generation (its got its own role)
This commit is contained in:
2024-05-07 15:06:02 +02:00
parent 31e9283fc0
commit 19ed4cd113
8 changed files with 23 additions and 66 deletions
+7 -7
View File
@@ -1,15 +1,18 @@
---
# tasks file for apache_vhost
- include_vars: "{{ ansible_os_family|lower }}.yml"
tags: always
- name: create dedicated user
user:
name: "{{ apache_user }}"
groups:
- apache
- "{{ apache_group }}"
home: "{{ apache_base_dir }}"
shell: /bin/bash
when: apache_user_password is not defined and apache_user != 'apache'
tags: apache_user
- name: create dedicated user - ssh
user:
@@ -20,13 +23,14 @@
home: "{{ apache_base_dir }}"
shell: /bin/bash
when: apache_user_password is defined
tags: apache_user
- name: create directories
file:
path: "{{ item }}"
state: directory
owner: "{{ apache_user }}"
group: apache
group: "{{ apache_group }}"
mode: 0750
loop:
- "{{ apache_base_dir }}"
@@ -39,14 +43,10 @@
include_tasks: dns.yml
when: apache_use_dns
- name: create certificate
include_tasks: certbot.yml
when: apache_use_ssl
- name: vhost config file
template:
src: vhost.conf.jj
dest: /etc/httpd/conf.d/{{ apache_server_name }}.conf
dest: "{{ apache_config_dir }}/{{ apache_server_name }}.conf"
mode: 0644
notify: restart apache