renamed and optimized homepage role

This commit is contained in:
2023-11-17 13:54:56 +01:00
parent dfaa449989
commit eebf359d0a
6 changed files with 40 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
- name: configure {{domain}}.conf
template: src=homepage.nginx.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
notify: restart nginx
- name: recieve {{domain}} certificate
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
- name: nginx-homepage repo git
git:
repo: "{{nginx_homepage_repository_address}}"
dest: "{{nginx_homepage_root}}"
update: yes
register: git_result
ignore_errors: true
- name: Warn if repo is not reachable
debug:
msg: "Warning: Repository is not reachable."
when: git_result.failed