I wanted to use the data module to store the result of a runner execution to reduce duplicate processing, but just adding an import salt.modules.data
did not work, when the data.update()
call was made, it threw an exception (something about __opts__
). It took a bit of time and experimenting, but I found that I could load the module and call it like so:
import salt.client import salt.config __opts__ = salt.config.minion_config('/etc/salt/minion') datamod = salt.loader.raw_mod(__opts__, 'data', None) datamod['data.update']('keyname', 'value')
Hopefully this will help someone else, as when I looked in Google for answers (late August 2015) it was difficult to find anything about using modules in salt runner scripts.
]]>2¼ cups rice chex
2¼ cups corn chex
2¼ cups wheat chex
1 cup pretzel sticks
1 cup mixed nuts
½ cup butter or margarine
4 Tbs Worcestershire sauce
1½ tsp seasoned salt
¾ tsp garlic powder
½ tsp onion powder
Melt the butter in a 2 cup glass measuring cup in the microwave, add the Worcestershire sauce and mix thoroughly, then add the seasoned salt, garlic and onion powders and mix again. Pour over the chex, pretzels, & nuts and stir to coat as evenly as possible. Bake in a 275° oven for 60 minutes, stirring every 15 minutes. Pour out onto paper towels backed with newspapers to cool.
]]>From reading numerous websites, I guess that multiple monitor support didn’t improve with 9.10 over 9.04, but I did find a couple of articles that helped me craft a setup that works for me.
The original articles are:
What I ended up with was a couple of small scripts in my bin directory called ext-on and ext-off:
ext-on
#!/bin/sh
xrandr --output LVDS1 --primary
xrandr --output LVDS1 --auto --pos 0x0 --output VGA1 --auto --right-of LVDS1
ext-off
#!/bin/sh
xrandr --output VGA1 --off --output LVDS1 --auto
I then used gconf-edit
to bind those commands to <Super>-2 and <Super>-1 respectively to turn on and off the external monitor.
Hope this helps someone else looking for an easier way to manage a second monitor than having to go into display properties every time you connect to an external monitor.
]]>