Search code examples
salt-project

salt state.apply returns with non-zero exit code


I'm trying to apply state 'nettools.sls' and I'm receiving

ERROR: Minions returned with non-zero exit code. ran command: salt 'minion*' state.apply nettools

Running on Ubuntu Server 18.04 with XFCE desktop, I've tried having the sls in etc/salt/ and in the home directory

install_network_packages:
  pkg.installed:
    - pkgs:
      - rsync
      - lftp
      - curl

I receive data failed to compile: no matching sls found for 'nettools' in env 'base'


Solution

  • Salt's states (sls files) go in /srv/salt/ unless you've modified the file_roots option in your master config file.

    So if you place your file in /srv/salt/nettools.sls you should be able to run the following command:

    salt <minion id> state.apply nettools