0

Following state file throws an error "Rendering SLS 'base:settings.app.state.sls' failed: mapping values are not allowed in this context"

I rendered the state of the minion into a file and threw it into yaml-lint. That part of the state seems ok to me...

openliberty-firewalld-web-service:
  firewalld.service
    - name: openlibweb
    - ports:
      - 10080/tcp
      - 10443/tcp
      - 11080/tcp
      - 11443/tcp

Yamllint: (): mapping values are not allowed in this context at line 219 column 11

Might the error still origin from another part of the state file?

Thanks!

Hemanth Kumar
  • 314
  • 2
  • 7
msr
  • 33
  • 1
  • 2
  • 11
  • 1
    did you forget the ":" after firewalld.service? This is necessary in the state declaration (https://docs.saltproject.io/en/latest/ref/states/highstate.html#state-declaration) – natxo asenjo Jul 17 '22 at 19:08

1 Answers1

1

You are missing a :, resulting in invalid YAML.

openliberty-firewalld-web-service:
  firewalld.service
                   ^
OrangeDog
  • 569
  • 4
  • 20