SaltStack status for installing the file and .deb package dependencies

I have a salt formula. On the server I use tools wkhtmltopdf. Ubuntu repo has this tool, but it has an older version. I want to use the latest version.

I am doing the following to set it to minions manually.

$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
$ sudo apt-get install fontconfig libfontenc1 libjpeg-turbo8 libxfont1 x11-common xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils libxrender1
$ sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb

I can do cmd.runfor all of these teams. Is there a better way to do any of these steps?

+4
source share
1 answer

You can specify a remote parameter sourcesin the Salt pkg state. You can try something like this

cat stuff.sls

my_pkgs:
  - pkg.installed:
    - pkgs:
      - fontconfig
      - libfontenc1
      - libjpeg-turbo8 
      - libxfont1
      - x11-common
      - xfonts-75dpi
      - xfonts-base
      - xfonts-encodings
      - xfonts-utils
      - libxrender1

install_wkhtmltox:
  pkg.installed:
    - sources:
      - wkhtmltox: http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
+13
source

Source: https://habr.com/ru/post/1599072/


All Articles