- name: define packages list variables ansible.builtin.set_fact: run_pkgs: "rsync \ cyrus-sasl \ curl \ lz4 \ zstd \ xxHash \ nghttp2 \ brotli" build_pkgs: "autoconf-2 \ automake \ binutils-2 \ bison \ diffutils \ flex \ gc \ gcc-11 \ gettext \ gettext-tools \ glibc-2 \ guile \ kernel-headers \ libtool \ m4-1 \ make \ patch \ pkg-config" - name: install run-time and build-time requirements ansible.builtin.shell: executable: /bin/bash cmd: | set -e if [[ {{ansible_check_mode}} = True ]]; then for pkg in {{run_pkgs}}; do ls -1 /var/log/packages/$pkg* done; unset pkg for pkg in {{build_pkgs}}; do ls -1 /var/log/packages/$pkg* done; unset pkg elif [[ {{ansible_check_mode}} = False ]]; then slackpkg -batch=on -default_answer=y install {{run_pkgs}} slackpkg -batch=on -default_answer=y install {{build_pkgs}} else echo unknown ansible_check_mode {{ansible_check_mode}} exit 1 fi ldd /usr/bin/rsync >/dev/null ldd /usr/libexec/gnupg/gpgkeys_curl >/dev/null register: sboreq check_mode: false changed_when: > ( ansible_check_mode and sboreq.rc != 0 ) or ( not ansible_check_mode and sboreq.rc != 20 ) failed_when: > ( ansible_check_mode and sboreq.rc != 0 ) or ( not ansible_check_mode and sboreq.rc != 20 ) - debug: var=sboreq.stdout changed_when: > ( ansible_check_mode and sboreq.rc != 0 ) or ( not ansible_check_mode and sboreq.rc != 20 ) when: > ( ansible_check_mode and sboreq.rc != 0 ) or ( not ansible_check_mode and sboreq.rc != 20 ) - debug: var=sboreq.stderr changed_when: > ( ansible_check_mode and sboreq.rc != 0 ) or ( not ansible_check_mode and sboreq.rc != 20 ) when: > ( ansible_check_mode and sboreq.rc != 0 ) or ( not ansible_check_mode and sboreq.rc != 20 ) - name: install and sync sbopkg ansible.builtin.shell: executable: /bin/bash cmd: | set -e [[ ! -f sbopkg-0.38.3-noarch-1_wsr.tgz ]] && \ wget -q https://github.com/sbopkg/sbopkg/releases/download/0.38.3/sbopkg-0.38.3-noarch-1_wsr.tgz installpkg --terse sbopkg-0.38.3-noarch-1_wsr.tgz wget -q -O- https://slackbuilds.org/GPG-KEY | gpg --import - echo -n sbopkg sync ... sbopkg -q -r >/dev/null && echo done creates: /usr/sbin/sbopkg register: install_sbopkg - debug: var=install_sbopkg.stdout when: install_sbopkg.stdout != '' or install_sbopkg.stdout|length == 0 - debug: var=install_sbopkg.stderr when: install_sbopkg.stderr != ''