--- - name: One way to avoid apt_key once it is removed from your distro block: - name: check if keyring-file is present ansible.builtin.stat: path: /usr/share/keyrings/koha-keyring.gpg register: stat_keyring - name: somerepo |no apt key ansible.builtin.shell: cmd: wget -qO - https://debian.koha-community.org/koha/gpg.asc | gpg --dearmor -o /usr/share/keyrings/koha-keyring.gpg when: not stat_keyring.stat.exists - name: check if repo-file is present ansible.builtin.stat: path: /etc/apt/sources.list.d/koha.list register: stat_repo - name: somerepo | apt source ansible.builtin.apt_repository: repo: "deb [signed-by=/usr/share/keyrings/koha-keyring.gpg] https://debian.koha-community.org/koha stable main" state: present filename: koha when: not stat_repo.stat.exists - name: install server specific packages ansible.builtin.apt: update_cache: yes pkg: - mariadb-server - koha-common - name: edit config file ansible.builtin.lineinfile: path: /etc/koha/koha-sites.conf regexp: 'DOMAIN=*' line: 'DOMAIN="{{ koha_domain }}"' - name: apache enable a2enmod rewrite ansible.builtin.command: cmd: /usr/sbin/a2enmod rewrite # notify: restart apache - name: apache enable a2enmod cgi ansible.builtin.command: cmd: /usr/sbin/a2enmod cgi # notify: restart apache - name: apache restart ansible.builtin.command: cmd: systemctl restart apache2 # once only #- name: create library instance # ansible.builtin.command: # cmd: koha-create --create-db {{ koha_libraryname }} - name: enable apache module for koha-plack ansible.builtin.command: cmd: a2enmod headers proxy_http # notify: restart apache #only once -> check? #- name: enable koha-plack # ansible.builtin.command: # cmd: koha-plack --enable {{ koha_libraryname }} # notify: restart apache #CHECK! - name: start koha-plack ansible.builtin.command: cmd: koha-plack --start {{ koha_libraryname }} # notify: restart apache - name: apache restart ansible.builtin.command: cmd: systemctl restart apache2 # only once -> check how? - name: install german language-pack ansible.builtin.command: cmd: koha-translate --install de-DE # thanks to # https://wiki.koha-community.org/wiki/Koha_on_Debian # https://zefanjas.de/wie-man-koha-installiert-und-fuer-schulen-einrichtet-teil-1/ ...