Files
@ 140270910fde
Branch filter:
Location: freifunk/Ansible-Configuration/firmware/firmware.freifunk.lu.yml - annotation
140270910fde
1.1 KiB
text/x-yaml
fix: firmware playbook follows ansiblelint
5a1431fa7615 140270910fde 140270910fde 140270910fde 5a1431fa7615 140270910fde 5a1431fa7615 5a1431fa7615 5a1431fa7615 140270910fde 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 140270910fde 5a1431fa7615 5a1431fa7615 140270910fde 140270910fde 140270910fde 5a1431fa7615 5a1431fa7615 5a1431fa7615 140270910fde 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 140270910fde 5a1431fa7615 140270910fde | ---
- name: "Setup the firmware.freifunk.lu website"
hosts: test
become: true
vars:
server_name: 'firmware.freifunk.lu'
document_root: /var/www/firmware.freifunk.lu
tasks:
- name: Update apt cache and install Nginx
ansible.builtin.apt:
name: nginx
# Create directory firmware.freifunk.lu
- name: Create the directory firmware.freifunk.lu in /var/www if it does not exist
ansible.builtin.file:
path: /var/www/firmware.freifunk.lu
state: directory
mode: '0755'
- 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
handlers:
- name: Restart Nginx
ansible.builtin.service:
name: nginx
state: restarted
|