# https://docs.searxng.org/admin/installation-docker.html#installation-docker --- - name: 'Create Searxng data dir' file: path: '{{ searxng_data_root }}' state: 'directory' owner: '{{ ansible_user }}' group: '{{ ansible_user }}' mode: '755' - name: 'Copy over searxng settings file to data dir' template: src: 'settings.yaml.j2' dest: '{{ searxng_data_root }}/settings.yml' owner: '{{ ansible_user }}' group: '{{ ansible_user }}' mode: '644' notify: - 'redis_restart' - 'searxng_restart' - name: 'Create the Searxng network' community.docker.docker_network: name: '{{ searxng_docker_network_name }}' ipam_driver: 'default' state: 'present' - name: 'Make sure the Redis container is created and running' community.docker.docker_container: name: '{{ searxng_redis_container_name }}' image: 'redis:alpine' command: 'redis-server --save "" --appendonly "no"' networks: - name: '{{ searxng_docker_network_name }}' tmpfs: - '/var/lib/redis' cap_drop: - 'ALL' capabilities: - 'SETGID' - 'SETUID' - 'DAC_OVERRIDE' state: 'started' restart_policy: 'unless-stopped' - name: 'Make sure the Searxng container is created and running' community.docker.docker_container: name: 'searxng' image: 'searxng/searxng:latest' networks: - name: '{{ searxng_docker_network_name }}' ports: - '0.0.0.0:{{ searxng_host_port }}:8080' volumes: - '{{ searxng_data_root }}/:/etc/searxng:rw' env: TZ': '{{ searxng_tz }}' cap_drop: - 'ALL' capabilities: - 'CHOWN' - 'SETGID' - 'SETUID' - 'DAC_OVERRIDE' log_driver: 'json-file' log_options: max-size: '1m' max-file: '1' state: 'started' restart_policy: 'unless-stopped'