# https://docs.searxng.org/admin/installation-docker.html#installation-docker - name: Set up SearXNG hosts: lotus-land-story vars_files: - vars.yml tasks: - name: Create directory for volume mounting ansible.builtin.file: path: /mnt/lotus-land-story/searxng state: directory mode: "0700" - name: Write settings.xml ansible.builtin.copy: dest: /mnt/lotus-land-story/searxng/settings.yml content: | use_default_settings: true server: secret_key: {{ searxng.secret_key }} engines: - name: brave disabled: true mode: "0644" - name: Get docker network community.docker.docker_network: name: lotus_land_story register: docker_network - name: Run SearXNG community.docker.docker_container: restart: true name: searxng image: searxng/searxng:2024.1.17-7c80807bb env: SEARXNG_BASE_URL: https://search.{{ domain }} volumes: - /mnt/lotus-land-story/searxng/settings.yml:/etc/searxng/settings.yml restart_policy: unless-stopped networks: - name: lotus_land_story etc_hosts: host.docker.internal: host-gateway handlers: - name: Import restarts ansible.builtin.import_tasks: restarts.yml # vim: ft=yaml.ansible