Files
gitlab-mirror/roles/nginx/molecule/default/converge.yml
2025-12-16 13:58:41 +03:00

37 lines
874 B
YAML

---
- name: Converge
hosts: all
post_tasks:
- name: "Create a test site root"
ansible.builtin.file:
path: /var/www/html
state: directory
owner: nginx
group: nginx
mode: "0755"
- name: "Push a test index file"
ansible.builtin.copy:
src: index.html
dest: /var/www/html
owner: nginx
group: nginx
mode: "0644"
roles:
# using default NGINX verison
- role: genlab.common.nginx
site:
confname: test-var
content: |
server {
listen 80;
server_name example.com www.example.com;
location / {
root /var/www/html;
index index.html;
}
}
dir_sites: '{{ lookup("env", "MOLECULE_PROJECT_DIRECTORY") }}/molecule/default/site-configs/'