Files
@ 95993c623d68
Branch filter:
Location: freifunk/Ansible-Configuration/firmware/firmware.freifunk.lu.yml - annotation
95993c623d68
1023 B
text/x-yaml
feat: initial_server, replace colorful PS1 w/ color+feat for root bashrc
5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 5a1431fa7615 | ---
- hosts: test
become: yes
vars:
server_name: 'firmware.freifunk.lu '
document_root: /var/www/firmware.freifunk.lu
tasks:
- name: Update apt cache and install Nginx
apt:
name: nginx
state: latest
update_cache: yes
# 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
template:
src: /etc/ansible/playbooks/files/firmware.conf.j2
dest: /etc/nginx/sites-available/firmware.freifunk.lu
notify: Restart Nginx
- name: Enable new site
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
service:
name: nginx
state: restarted
|