Files
@ dda8ec45e71c
Branch filter:
Location: freifunk/Ansible-Configuration/firmware/firmware.freifunk.lu.yml - annotation
dda8ec45e71c
1.1 KiB
text/x-yaml
style: install_website, variable reuse instead of copy-paste
5a1431fa7615 140270910fde 140270910fde 140270910fde 5a1431fa7615 140270910fde 5a1431fa7615 07ee9a8ac447 07ee9a8ac447 07ee9a8ac447 07ee9a8ac447 07ee9a8ac447 07ee9a8ac447 5a1431fa7615 07ee9a8ac447 140270910fde 5a1431fa7615 07ee9a8ac447 5a1431fa7615 5a1431fa7615 5a1431fa7615 07ee9a8ac447 07ee9a8ac447 07ee9a8ac447 5a1431fa7615 140270910fde 5a1431fa7615 5a1431fa7615 140270910fde 140270910fde 140270910fde 5a1431fa7615 5a1431fa7615 140270910fde 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 | ---
- name: "Setup the firmware.freifunk.lu website"
hosts: test
become: true
vars:
server_name: 'firmware.freifunk.lu'
document_root: /var/www/firmware.freifunk.lu
handlers:
- name: Restart Nginx
ansible.builtin.service:
name: nginx
state: restarted
tasks:
- name: Install nginx
ansible.builtin.apt:
name: nginx
- name: Create webroot for firmware.freifunk.lu
ansible.builtin.file:
path: /var/www/firmware.freifunk.lu
state: directory
mode: '0775'
owner: root
group: sudo
- name: Apply Nginx template
ansible.builtin.template:
src: /etc/ansible/playbooks/files/firmware.conf.j2
dest: /etc/nginx/sites-available/firmware.freifunk.lu
owner: root
group: root
mode: "0644"
notify: Restart Nginx
- name: Enable new site
ansible.builtin.file:
src: /etc/nginx/sites-available/firmware.freifunk.lu
dest: /etc/nginx/sites-enabled/firmware.freifunk.lu
state: link
notify: Restart Nginx
|