This Salt proxy module can be used to query (dummy) JSON data from JSONPlaceholder. It was created as part of the learning process and it should be treated as such (use it at your own risk).
- Install Salt according to The Salt install guide. For simplicity, it is assumed that Salt master and minion are on the same machine.
- Copy contents of
srv
folder in this project to/srv
folder on your Salt machine.
-
display a blog post:
sudo salt proxy_blog proxy_blog.show_blog_post <blog_post_id>
-
display a blog post, including its author's name:
sudo salt proxy_blog proxy_blog.show_blog_post <blog_post_id> author=True
-
display a blog post, including its author's name and all comments that are associated to the post:
sudo salt proxy_blog proxy_blog.show_blog_post <blog_post_id> author=True comments=True
Check out proxy_blog.asiinema
, it shows usage samples in form of asciinema recording.