This file contains hidden or 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
| download_webui: | |
| cmd.run: | |
| - name: curl https://severabc/job/Build-Plans/job/ogp-web-ui/job/lastSuccessfulBuild/artifact/ogp-web-ui_jenkins-build.tgz -o /srv/salt/spectrum/ogp-web-ui_jenkins-build.tgz -k |
This file contains hidden or 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
| import distutils.sysconfig | |
| import sys | |
| import salt.client | |
| plib = distutils.sysconfig.get_python_lib() | |
| mod_path = '{0}/cobbler'.format(plib) | |
| sys.path.insert(0, mod_path) | |
| def register(): |
This file contains hidden or 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
| import distutils.sysconfig | |
| import sys | |
| import salt.client | |
| plib = distutils.sysconfig.get_python_lib() | |
| mod_path = '{0}/cobbler'.format(plib) | |
| sys.path.insert(0, mod_path) | |
| def register(): |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| ''' | |
| SCSI administration module | |
| ''' | |
| from __future__ import absolute_import | |
| import os.path | |
| import logging | |
| log = logging.getLogger(__name__) |
This file contains hidden or 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
| Here's the code from an execution module: | |
| try: | |
| return client.watch(key, recurse=recurse, wait=True, timeout=timeout, index=index) | |
| except urllib3.exceptions.ReadTimeoutError as e: | |
| return 'got timeout' | |
| except Exception as e: | |
| return str(type(e)) | |
| When it runs: |
This file contains hidden or 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
| opts = salt.config.master_config('/etc/salt/master') | |
| opts['quiet'] = True | |
| r = salt.runner.RunnerClient(opts) | |
This file contains hidden or 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
| cmd.run: | |
| salt.function: | |
| - tgt: 'alpha' | |
| - arg: | |
| - 'ls -l /tmp' | |
| - require: | |
| - salt: test | |
| test: | |
| salt.function: |
This file contains hidden or 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
| [root@alpha pillar]# pwd | |
| /srv/pillar | |
| [root@alpha pillar]# ls | |
| cobbler.sls quickbase.sls top.sls | |
| [root@alpha pillar]# cat top.sls | |
| base: | |
| 'alpha': | |
| - quickbase | |
| 'steve': | |
| - cobbler |
This file contains hidden or 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
| sks_build: | |
| cmd.run: | |
| - name: /usr/sbin/sks build {{ sks.datadir }}/dump/*.pgp -n 2 -cache 50 | |
| - creates: {{ sks.datadir }}/DB/key | |
| - user: {{ sks.user }} | |
| - require: | |
| - pkg: sks | |
| sks_build_done: | |
| file.exists: |
This file contains hidden or 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
| master: | |
| - master1 | |
| - master2 | |
| - | |
| - master3a | |
| - master3b | |
| - master4 |
NewerOlder