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
#!/bin/bash | |
node app.js | |
cd (path to client) | |
ionic serve |
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
minion_watchdog: | |
cloud.absent: | |
- tgt: {{ grains['id'] }} | |
- unless: | |
- cmd.run: /tmp/uptime_test | |
require: | |
- file: /tmp/uptime_test | |
/tmp/uptime_test: | |
file.managed: |
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
---------- | |
ID: minion_watchdog | |
Function: cloud.absent | |
Result: False | |
Comment: An exception occurred in this state: Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1563, in call | |
**cdata['kwargs']) | |
File "/usr/lib/python2.7/dist-packages/salt/states/cloud.py", line 181, in absent | |
if retcode(unless) == 0: | |
File "/usr/lib/python2.7/dist-packages/salt/modules/cmdmod.py", line 1099, in retcode |
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
#!/usr/bin/env python | |
import salt.config | |
import salt.cloud.CloudClient as client | |
import salt.loader | |
__opts__ salt.config.minion_config('/etc/salt/minion') | |
__grains__ = salt.loader.grains(__opts__) | |
minion_name = __grains__['id'] |
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
#!/usr/bin/env python | |
''' | |
This function gathers the grains uptime_minutes and assigns it to uptime_grain, if uptime_grain is more than 7 minutes, | |
it will destroy the instance given by instance name provided by grains ID. | |
''' | |
import salt.config | |
import salt.cloud.CloudClient as client | |
import salt.loader |
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
#!/usr/bin/env python | |
''' | |
This function gathers the grains uptime_minutes and assigns it to uptime_grain, if uptime_grain is more than 7 minutes, | |
it will destroy the instance given by instance name provided by grains ID. | |
''' | |
import salt.config | |
import salt.cloud.CloudClient as client | |
import salt.loader |
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
''' | |
This function gathers the grains uptime_minutes and assigns it to uptime_grain, if uptime_grain is more than 7 minutes, | |
it will destroy the instance given by instance name provided by grains ID. | |
''' | |
import salt.cloud.CloudClient as client | |
def __virtual__(): | |
''' | |
Only for machines running more than 7 minutes |
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
''' | |
This function gathers the grains uptime_minutes and assigns it to uptime_grain, if uptime_grain is more than 7 minutes, | |
it will destroy the instance given by instance name provided by grains ID. | |
''' | |
import salt.cloud.CloudClient as client | |
def __virtual__(): | |
''' | |
Only for machines running more than 7 minutes |
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
''' | |
This function gathers the grains uptime_minutes and assigns it to uptime_grain, if uptime_grain is more than 7 minutes, | |
it will destroy the instance given by instance name provided by grains ID. | |
''' | |
import salt.cloud.CloudClient as client | |
def __virtual__(): | |
''' |
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
''' | |
This function gathers the grains uptime_minutes and assigns it to uptime_grain, if uptime_grain is more than 7 minutes, | |
it will destroy the instance given by instance name provided by grains ID. | |
''' | |
def __virtual__(): | |
''' | |
Only for machines running more than 7 minutes | |
''' | |
# return 'checkhighstate' if __grains__['uptime_minutes'] > 7 else False |
OlderNewer