Salt stack execution module
Salt execution module is a Python module that runs on a Salt minion. It performs tasks and returns data to the Salt master
Prepare Salt
The files created in the following steps will be located in the /srv/salt directory. If we have changed Salt’s default file_roots configuration, use that directory location instead.
creating the /srv/salt directory if it does not already exist. This is where we will place our top file and our Salt state file
#mkdir /srv/salt
Create a top file in /srv/salt which will be Salt’s point of entry for our Salt configuration
# cat top.sls
base:
'*':
- weather
Create a state file named weather.sls and instruct Salt to make sure our minions have PIP installed, as well as the required Python library.
# cat weather.sls
python-pip:
pkg.installed
requests:
pip.installed:
- require:
- pkg: python-pip
Apply these state changes
#salt '*' state.apply
Recent Comments
No comments
Leave a Comment
We will be happy to hear what you think about this post