ansible/playbooks/05_pullimage.yml
2022-12-14 02:23:34 +01:00

30 lines
810 B
YAML

- hosts: rhasspy
name: Install rhasspy
become: true
become_user: root
tasks:
- name: Install curl,mosquitto ...
ansible.builtin.apt:
name:
- python3-pip
- name: Install pip modules
ansible.builtin.pip:
name: docker
- name: Pull image
community.docker.docker_image:
name: rhasspy/rhasspy
source: pull
- name: Create container
community.docker.docker_container:
name: rhasspy
image: rhasspy/rhasspy
command: --user-profiles /profiles --profile en
devices:
- "/dev/snd:/dev/snd"
restart_policy: unless-stopped
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/home/jd/.config/rhasspy/profiles:/profiles"
ports:
- "12101:12101"