I've got an sls file; the contents of which follow:
apache:
pkg.installed:
-name: apache2
service.running:
-enable: True
- require:
- pkg: apache
And I'm getting the error when trying to provision an Ubuntu Vagrant box with salt using the salt-master:
State 'apache' in SLS 'webserver' is not formed as a list
I've tried editing it and I've noticed that you can't have a chunk of code ending in a :
but I can't see what's wrong with this.
The salt-master is running on an Ubuntu box and the key is accepted. I'm new to salt!
I've just put it through an on-line YAML parser and it seems to be okay. Wot is I missin'?
I don't think you need the double space indent, mine works with single, but you do need a space after the dashes.
apache:
pkg.installed:
- name: apache2
service.running:
- enable: True
- require:
- pkg: apache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With