-
-
Save TTimo/826e2de037d07ed6a92d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/r/ql-docker# salt-call -l debug --local state.highstate | |
[DEBUG ] Reading configuration from /etc/salt/minion | |
[DEBUG ] Configuration file path: /etc/salt/minion | |
[DEBUG ] Reading configuration from /etc/salt/minion | |
[DEBUG ] Reading configuration from /etc/salt/minion | |
[INFO ] Loading fresh modules for state activity | |
[DEBUG ] Jinja search path: ['/srv/salt'] | |
[DEBUG ] Rendered data from file: /srv/salt/top.sls: | |
base: | |
'*': | |
- sshd | |
[DEBUG ] Results of YAML rendering: | |
OrderedDict([('base', OrderedDict([('*', ['sshd'])]))]) | |
[DEBUG ] Syncing all | |
[INFO ] Creating module dir '/var/cache/salt/minion/extmods/modules' | |
[INFO ] Syncing modules for environment 'base' | |
[INFO ] Loading cache from salt://_modules, for base) | |
[INFO ] Caching directory '_modules/' for environment 'base' | |
[DEBUG ] Local cache dir: '/var/cache/salt/minion/files/base/_modules' | |
[INFO ] Creating module dir '/var/cache/salt/minion/extmods/states' | |
[INFO ] Syncing states for environment 'base' | |
[INFO ] Loading cache from salt://_states, for base) | |
[INFO ] Caching directory '_states/' for environment 'base' | |
[DEBUG ] Local cache dir: '/var/cache/salt/minion/files/base/_states' | |
[INFO ] Creating module dir '/var/cache/salt/minion/extmods/grains' | |
[INFO ] Syncing grains for environment 'base' | |
[INFO ] Loading cache from salt://_grains, for base) | |
[INFO ] Caching directory '_grains/' for environment 'base' | |
[DEBUG ] Local cache dir: '/var/cache/salt/minion/files/base/_grains' | |
[INFO ] Creating module dir '/var/cache/salt/minion/extmods/renderers' | |
[INFO ] Syncing renderers for environment 'base' | |
[INFO ] Loading cache from salt://_renderers, for base) | |
[INFO ] Caching directory '_renderers/' for environment 'base' | |
[DEBUG ] Local cache dir: '/var/cache/salt/minion/files/base/_renderers' | |
[INFO ] Creating module dir '/var/cache/salt/minion/extmods/returners' | |
[INFO ] Syncing returners for environment 'base' | |
[INFO ] Loading cache from salt://_returners, for base) | |
[INFO ] Caching directory '_returners/' for environment 'base' | |
[DEBUG ] Local cache dir: '/var/cache/salt/minion/files/base/_returners' | |
[INFO ] Creating module dir '/var/cache/salt/minion/extmods/outputters' | |
[INFO ] Syncing outputters for environment 'base' | |
[INFO ] Loading cache from salt://_outputters, for base) | |
[INFO ] Caching directory '_outputters/' for environment 'base' | |
[DEBUG ] Local cache dir: '/var/cache/salt/minion/files/base/_outputters' | |
[INFO ] Creating module dir '/var/cache/salt/minion/extmods/utils' | |
[INFO ] Syncing utils for environment 'base' | |
[INFO ] Loading cache from salt://_utils, for base) | |
[INFO ] Caching directory '_utils/' for environment 'base' | |
[DEBUG ] Local cache dir: '/var/cache/salt/minion/files/base/_utils' | |
[DEBUG ] Refreshing modules... | |
[INFO ] Loading fresh modules for state activity | |
[DEBUG ] Jinja search path: ['/srv/salt'] | |
[DEBUG ] Rendered data from file: /srv/salt/sshd.sls: | |
sshd_root_login: | |
file.replace: | |
- name: /etc/ssh/sshd_config | |
- pattern: ".*PermitRootLogin .*" | |
- repl: "PermitRootLogin no" | |
#sshd_password_auth: | |
# file.replace: | |
# - name: /etc/ssh/sshd_config | |
# - pattern: ".*PasswordAuthentication .*" | |
# - repl: "PasswordAuthentication no" | |
# | |
#sshd_challenge_response: | |
# file.replace: | |
# - name: /etc/ssh/sshd_config | |
# - pattern: ".*ChallengeResponseAuthentication .*" | |
# - repl: "ChallengeResponseAuthentication no" | |
# | |
# TODO: have not been able to restart only if the configs are changing above | |
# https://gist.github.com/TTimo/e7249daf3d1b55366738 'One or more requisites failed' | |
"service ssh restart": | |
cmd.run: | |
- onchanges: | |
- file: sshd_root_login | |
# - file: /etc/ssh/sshd_config | |
[DEBUG ] Results of YAML rendering: | |
OrderedDict([('sshd_root_login', OrderedDict([('file.replace', [OrderedDict([('name', '/etc/ssh/sshd_config')]), OrderedDict([('patter | |
n', '.*PermitRootLogin .*')]), OrderedDict([('repl', 'PermitRootLogin no')])])])), ('service ssh restart', OrderedDict([('cmd.run', [O | |
rderedDict([('onchanges', [OrderedDict([('file', 'sshd_root_login')])])])])]))]) | |
[INFO ] Running state [/etc/ssh/sshd_config] at time 10:28:01.423880 | |
[INFO ] Executing state file.replace for /etc/ssh/sshd_config | |
[INFO ] No changes were made | |
[INFO ] Completed state [/etc/ssh/sshd_config] at time 10:28:01.425859 | |
[DEBUG ] LazyLoaded .returner | |
local: | |
---------- | |
ID: sshd_root_login | |
Function: file.replace | |
Name: /etc/ssh/sshd_config | |
Result: True | |
Comment: No changes were made | |
Started: 10:28:01.423880 | |
Duration: 1.979 ms | |
Changes: | |
---------- | |
ID: service ssh restart | |
Function: cmd.run | |
Result: False | |
Comment: One or more requisite failed | |
Started: | |
Duration: | |
Changes: | |
------------ | |
Succeeded: 1 | |
Failed: 1 | |
------------ | |
Total states run: 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment