0

Why is this state.sls not working?

install_ports:
  - ports.update:
    - extract: True

When running

salt '*' state.highstate

I get a return of:

SaltMaster:
    Data failed to compile:
----------
    ID install_ports in SLS FreeBSD.11_0.ports is not a dictionary
ERROR: Minions returned with non-zero exit code
root@SaltMaster [~]$

I worked according to:

https://docs.saltstack.com/en/2015.8/ref/modules/all/salt.modules.freebsdports.html

https://docs.saltstack.com/en/latest/ref/states/all/salt.states.ports.html#module-salt.states.ports

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
Leander
  • 11
  • 6
  • sorry, I meant: Why is this not working: – Leander Mar 13 '17 at 21:47
  • install_ports: ports.update: - extract: True – Leander Mar 13 '17 at 21:48
  • Result: ID: install_ports Function: ports.update Result: False Comment: State 'ports.update' was not found in SLS 'FreeBSD.11_0.ports' Reason: 'ports.update' is not available. Changes: – Leander Mar 13 '17 at 21:48
  • install_ports: ports.update: - extract: True Thanks. Unfortunately it is also not working. It throws: State 'ports.update' was not found in SLS 'FreeBSD.11_0.sync_ports' Reason: 'ports.update' is not available. – Leander Mar 15 '17 at 22:43

1 Answers1

3

Lines beginning with "-" are items in a YAMl list, and your 'install_ports' line is expecting a dictionary.

Thus, you should change '- ports.update:' to 'ports.update:' to get rid of the error.

rothsa
  • 41
  • 4