Wait for minion to reboot to continue state

14 views
Skip to first unread message

Swastik Johari

unread,
Feb 21, 2023, 11:22:51 AM2/21/23
to Salt-users

I am trying to auto windows patching where enabling ,checking reboot, disabling services.
trying orchestration for it where salt-runner not available

here is the windows_update.sls:

enable_services:
runner.state.sls:
- mods: service_enable

check_updates:
runner.state.sls:
- mods: update_critical

check_reboot:
runner.function:
- fun: system.reboot
- name: check_reboot

wait_for_minion:
runner.function:
- fun: saltutil.runner
- name: wait_for_minion
- args:
- manage.up
- kwargs:
tgt: 'minion-patchv2-1.c.salt-training-374409.internal'

disable_services:
runner.state.sls:
- mods: service_disable

Logs:

[ERROR ][22035] State 'runner.state' was not found in SLS 'windows_updates'
Reason: 'runner.state' is not available.
[ERROR ][22035] State 'runner.state' was not found in SLS 'windows_updates'
Reason: 'runner.state' is not available.
[ERROR ][22035] State 'runner.function' was not found in SLS 'windows_updates'
Reason: 'runner.function' is not available.
[ERROR ][22035] State 'runner.function' was not found in SLS 'windows_updates'
Reason: 'runner.function' is not available.
[ERROR ][22035] State 'runner.state' was not found in SLS 'windows_updates'
Reason: 'runner.state' is not available.
[ERROR ][23348] State 'runner.state' was not found in SLS 'windows_updates'
Reason: 'runner.state' is not available.
[ERROR ][23348] State 'runner.state' was not found in SLS 'windows_updates'
Reason: 'runner.state' is not available.
[ERROR ][23348] State 'runner.function' was not found in SLS 'windows_updates'
Reason: 'runner.function' is not available.
[ERROR ][23348] State 'runner.function' was not found in SLS 'windows_updates'
Reason: 'runner.function' is not available.
][ERROR ][23348] State 'runner.state' was not found in SLS 'windows_updates'

Versions Report

Salt Version:
Salt: 3005.1

Dependency Versions:
cffi: 1.14.6
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.0
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.9.8
pygit2: Not Installed
Python: 3.9.16 (main, Jan 6 2023, 22:51:58)
python-gnupg: 0.4.8
PyYAML: 5.4.1
PyZMQ: 23.2.0
smmap: Not Installed
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.4

System Versions:
dist: centos 7 Core
locale: utf-8
machine: x86_64
release: 3.10.0-1160.83.1.el7.x86_64
system: Linux
version: CentOS Linux 7 Core

These 5 .sls files are stored in base: /srv/salt/
i have checked the configuration also tried adding runner_dirs: /srv/salt/
still no luck or else is there alternate approach for it?

Reply all
Reply to author
Forward
0 new messages