--- - hosts: local tasks: - name: wine (add architecture) ansible.builtin.shell: dpkg --add-architecture i386 - name: install gpg key Onlyoffice file: path: ~/.gnupg state: directory mode: '700' - name: create gpg key Onlyoffice ansible.builtin.shell: gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 - name: install gpg key Onlyoffice file: path: /tmp/onlyoffice.gpg state: touch owner: root group: root mode: '644' - name: copy key Onlyoffice copy: remote_src: yes src: /tmp/onlyoffice.gpg dest: /etc/apt/trusted.gpg.d/ - name: add Onlyoffcie to sources.list ansible.builtin.apt_repository: repo: deb https://download.onlyoffice.com/repo/debian squeeze main state: present filename: onlyoffice.list - name: install software-properties-common deb ansible.builtin.apt: name: software-properties-common - name: add Wine to sources.list ansible.builtin.apt_repository: repo: deb http://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs) main state: present filename: wine-stable.list - name: install Onlyoffice and Wine deb ansible.builtin.apt: pkg: - onlyoffice-desktopeditors - wine update_cache: yes - name: remove Libreoffice ansible.builtin.apt: name: libreoffice* state: absent - name: clear useless package ansible.builtin.apt: autoclean: yes