Files
@ 7382c88e89fc
Branch filter:
Location: freifunk/Ansible-Configuration/api/api.freifunk.lu.yml - annotation
7382c88e89fc
977 B
text/x-yaml
style: make initial-gw-setup conform MORE to the linter
Not perfect yet, but much better.
Issues right now lie with shell usage & permissions.
Not perfect yet, but much better.
Issues right now lie with shell usage & permissions.
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: 'api.freifunk.lu '
document_root: /var/www/api.freifunk.lu
tasks:
- name: Update apt cache and install Nginx
apt:
name: nginx
state: latest
update_cache: yes
# Create directory api.freifunk.lu
- name: Create the directory api.freifunk.lu in /var/www if it does not exist
ansible.builtin.file:
path: /var/www/api.freifunk.lu
state: directory
mode: '0755'
- name: Apply Nginx template
template:
src: /etc/ansible/playbooks/files/api.conf.j2
dest: /etc/nginx/sites-available/api.freifunk.lu
notify: Restart Nginx
- name: Enable new site
file:
src: /etc/nginx/sites-available/api.freifunk.lu
dest: /etc/nginx/sites-enabled/api.freifunk.lu
state: link
notify: Restart Nginx
handlers:
- name: Restart Nginx
service:
name: nginx
state: restarted
|