--- - name: "[Alpine] Fail when Option 'system.alpineVersion' not set" fail: msg: The option 'system.alpineVersion' has to be set! when: - ansible_distribution == "Alpine" - system.alpineVersion is not defined - name: "[Alpine] Get signature from personal repo" get_url: url: https://repo.ctu.cx/alpine/isa-60c52eb0.rsa.pub dest: /etc/apk/keys/isa-60c52eb0.rsa.pub when: - ansible_distribution == "Alpine" - system.enableOwnRepos is defined - system.enableOwnRepos is true - name: "[Alpine] Update file: /etc/apk/repositories" template: src: repositories.j2 dest: /etc/apk/repositories register: apk_repos when: - ansible_distribution == "Alpine" - name: "[Archlinux] Install package: patch" pacman: name: patch update_cache: yes when: - ansible_distribution == "Archlinux" - system.enableOwnRepos is defined - system.enableOwnRepos is true - name: "[Archlinux] Patch file: /etc/pacman.conf (add isas aur-repo)" ansible.posix.patch: src: pacman.conf.patch dest: /etc/pacman.conf when: - ansible_distribution == "Archlinux" - system.enableOwnRepos is defined - system.enableOwnRepos is true - name: "[Alpine] Update repos" raw: "apk update && apk upgrade" when: - ansible_distribution == "Alpine" - apk_repos.changed - name: "[Archlinux] Update repos" pacman: update_cache: yes register: pacman_update when: - ansible_distribution == "Archlinux" # TODO: make this check work #- fail: # msg: "[Archlinux] Repos have been updated, please upgrade the system manually and restart the playbook" # when: # - ansible_distribution == "Archlinux" # - pacman_update.changed - name: "[Alpine] Install common packages" apk: name: "{{ packages }}" update_cache: yes when: ansible_distribution == "Alpine" - name: "[Archlinux] Install common packages" pacman: name: "{{ packages }}" update_cache: yes when: ansible_distribution == "Archlinux" - name: "[Alpine] Install extra packages" apk: name: "{{ system.extraPackages }}" update_cache: yes when: - ansible_distribution == "Alpine" - system.extraPackages is defined - name: "[Archlinux] Install extra packages" pacman: name: "{{ system.extraPackages }}" update_cache: yes when: - ansible_distribution == "Archlinux" - system.extraPackages is defined