Skip to content

Instantly share code, notes, and snippets.

View duk3luk3's full-sized avatar

Lukas Erlacher duk3luk3

View GitHub Profile
namespace :sidekiq do
desc "GITLAB | Stop sidekiq"
task :stop do
system "script/background_jobs stop"
end
desc "GITLAB | Start sidekiq"
task :start do
system "script/background_jobs start"
end
10:48:30 /srv/salt# salt -l debug bb1 state.sls dirty-users.users test=True
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Missing configuration file: /root/.salt
[DEBUG ] loading log_handlers in ['/var/cache/salt/master/extmods/log_handlers', '/usr/lib/pymodules/python2.7/salt/log/handlers']
[DEBUG ] Skipping /var/cache/salt/master/extmods/log_handlers, it is not a directory
[DEBUG ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG ] Configuration file path: /etc/salt/master
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Missing configuration file: /root/.salt
[DEBUG ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
wildmode=full11:10:07 {master} /srv/salt/dirty-users# salt -l debug bb1 state.show_sls dirty-users
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Missing configuration file: /root/.salt
[DEBUG ] loading log_handlers in ['/var/cache/salt/master/extmods/log_handlers', '/usr/lib/pymodules/python2.7/salt/log/handlers']
[DEBUG ] Skipping /var/cache/salt/master/extmods/log_handlers, it is not a directory
[DEBUG ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG ] Configuration file path: /etc/salt/master
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Missing configuration file: /root/.salt
[DEBUG ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
top.sls:
base:
'*':
- common-pillar-data
'minion1':
- minion-one-pillar-data
'minion2:
- minion-two-pillar-data
users:
{% if grains['id'] == 'minion1' %}
foo:
- bar
{% elif grains['id'] == 'minion2' %}
bar:
- baz
{% endif %}
State: - file
Name: /etc/exports.d/salt.dirty-users.exports
Function: managed
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/salt/state.py", line 1258, in call
*cdata['args'], **cdata['kwargs'])
File "/usr/lib/pymodules/python2.7/salt/states/file.py", line 1131, in managed
contents)
File "/usr/lib/pymodules/python2.7/salt/modules/file.py", line 1941, in manage_file
02:27:41 {master} /srv/pillar# salt 'bb10' state.sls cron-reboot
bb10:
Data failed to compile:
----------
Pillar failed to render with the following messages:
----------
Specified SLS 'openvpn' in environment 'base' is not available on the salt master
02:28:36 {master} /srv/pillar# ls
dirty-users.sls nfs-users.sls openvpn-client.sls top.sls users.sls
02:28:40 {master} /srv/pillar# cat top.sls
12:52:37 (develop) ~/git/salt# service salt-master stop
12:53:58 (develop) ~/git/salt# scripts/salt-master &
[1] 32201
12:55:37 (develop) ~/git/salt# service salt-minion stop
12:56:00 (develop) ~/git/salt# scripts/salt-minion &
[2] 32563
12:56:30 (develop) ~/git/salt# scripts/salt-call state.sls dirty-users.users
[INFO ] Executing command 'ps -efH' in directory '/root'
[INFO ] Loading fresh modules for state activity
[INFO ] Fetching file ** skipped **, latest already in cache 'salt://dirty-users/users.sls'
$for(categories)$
<h3>$category$</h3>
$postlist$
$endfor$
<h3>$category$</h3>
$body$