dotfiles/.ansible/roles/searx_server/tasks/main.yaml

46 lines
978 B
YAML

- name: 'Searx'
tags:
- install
- searx
block:
- name: 'Searx: package'
package:
name: "{{ item }}"
state: latest
become: yes
loop:
- uwsgi
- uwsgi-plugin-python3
- name: 'Searx: Config directory'
file:
state: directory
path: '/srv/app/searx/searx'
become: yes
- name: 'Searx: Config'
copy:
dest: '/srv/app/searx/searx/settings.yml'
src: 'files/settings.yaml'
become: yes
- name: 'Searx: UWSGI integration'
copy:
dest: '/etc/uwsgi/apps-available/searx.ini'
src: 'files/uwsgi.ini'
become: yes
- name: 'Searx: UWSGI enable'
file:
dest: '/etc/uwsgi/apps-enabled/searx.ini'
src: '/etc/uwsgi/apps-available/searx.ini'
state: link
become: yes
- name: 'Searx: UWSGI service'
systemd:
name: 'uwsgi'
state: started
enabled: yes
become: yes