Unable to install & use your formulas
Hi @bechtoldt ,
thx for these formuals ! Could you provide some guidances on how to use them:
1/ unable to find the logstash state unless I rename the state directory to logstash
2/ unable to get salt to know about formhelper; I get the error: "Rendering SLS 'base:logstash' failed: Jinja variable 'LazyLoader' object has no attribute 'formhelper.get_defaults' "
Here my salt config: gitfs_remotes:
- file:///srv/formulas/bechtoldt-utils # git-cloned https://github.com/bechtoldt/salt-modules
file_roots: base: - /srv/salt - /srv/formulas/fail2ban - /srv/formulas/postgres-formula - /srv/formulas/elasticsearch-formula - /srv/formulas/kibana-formula - /srv/formulas/logstash-formula
Thanks a lot, Marc
@bechtoldt just for the record : his there an easy way to get it work quickly rather than waiting for the documentation enhancement ?
@mcassuto read https://github.com/bechtoldt/saltstack-sysctl-formula/issues/1 :)
for the records (any who will may encounter this issue), I ended up by renaming the states directory. and in my /etc/salt/master: file_roots: base: - /srv/salt - /srv/formulas/elasticsearch-formula - /srv/formulas/kibana-formula - /srv/formulas/logstash-formula - /srv/formulas/rsyslog-formula - /srv/formulas/bechtoldt-utils
@bechtoldt : I still get the error "Rendering SLS 'base:logstash' failed: Jinja variable 'LazyLoader' object has no attribute 'formhelper.get_defaults' "
What am I doing wrong ? (this was not cover in the other thread)
@mcassuto You need to make the directory _modules/ (from https://github.com/bechtoldt/salt-modules) available to Salt. Use Gitfs to mount the Git repository.
Still no chance:
- update saltstack to the very last version
- gitfs setup and repo added in gitfs_remotes
- tried also to clone the repo and add the directory into file_roots: base:
- tried also to simply copy the _modules in the main file_root
restarted salt-master each time.... any idea ?
The Salt Package Manager might be a solution for this issue in the future. I think it's still in a very early state. I'll file some feature requests.. :)
https://github.com/saltstack/salt/issues/24896 (PR) https://github.com/saltstack/salt/issues/25210 https://github.com/saltstack/salt/issues/25211
https://docs.saltstack.com/en/develop/topics/spm/