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
``` | |
project_root\ | |
\packages | |
\tests | |
``` |
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
$users = ['david.gonzales', 'akhter.ali', 'sierah.nguon'] | |
$users.each |String $users| { | |
user { $users: | |
ensure => 'present', | |
gid => '500', | |
password_hash => '!!', | |
uid => '500', | |
shell => '/bin/bash'} | |
} |
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
#FILE: hostname.list | |
hostname.domain.com | |
hostname2.domain.com | |
hostname3.domain.com | |
# shell script | |
for a in `cat hostname hostname.list` do ssh user@$a "yum remove datadog"`; done |
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
{ | |
"AlarmName": "breitling_Breitling-Daylight_UnHealthyHostCount Alarm", | |
"AlarmDescription": "Breitling-Daylight_UnHealthyHostCount Alarm", | |
"AWSAccountId": "271794010589", | |
"NewStateValue": "ALARM", | |
"NewStateReason": "Threshold Crossed: 1 datapoint (0.0) was not greater than the threshold (0.0).", | |
"StateChangeTime": "2016-07-06T15:36:41.406+0000", | |
"Region": "US East - N. Virginia", | |
"OldStateValue": "OK", | |
"Trigger": { |
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
Pillar | |
file | |
users/dev_accounts.sls | |
company_dev_accounts: | |
user.1: | |
username: user.1 | |
fullname: user 1 | |
shell: /bin/bash | |
home: /home/user.1 | |
uid: 10000 |
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
{% for args in pillar.get('service_accounts:teamcity', {}).items() %} | |
{{ args['user'] }}: | |
user.present: | |
- home: {{ args['home'] }} | |
- shell: {{ args['shell'] }} | |
- uid: {{ args['uid'] }} | |
- groups: {{ args['groups'] }} | |
- fullname: {{ args['fullname'] }} | |
ssh_auth.present: | |
- user: {{ args['user'] }} |
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
#!/usr/bin/env python | |
from boto3 import Session | |
from boto3 import client | |
import urllib | |
instance_id = urllib.urlopen('http://169.254.169.254/latest/meta-data/instance-id/').read() | |
def Register_To_ELB(*args): | |
print('my arg {0}'.format(args) |
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
[DEV [email protected] salt-master]# docker run -itd salt-master:latest /bin/bash | |
bbf3d9b9aa7ab2248cbdc7c1a6d56798d3075f9df449e3941e7f97244b002371 | |
[DEV [email protected] salt-master]# docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
bbf3d9b9aa7a salt-master:latest "/bin/bash" 8 seconds ago Up 7 seconds dreamy_banach | |
9c8da598d4bd salt-master:latest "/bin/sh -c salt-mast" About a minute ago Up About a minute salt4 | |
da8f6540f936 salt-master "/bin/sh -c salt-mast" 2 minutes ago Up 2 minutes salt3 | |
4b311c57b7c8 salt-master "/bin/sh -c salt-mast" 3 minutes ago Up 3 minutes salt2 | |
c3f6286f076c salt-master "/bin/sh -c salt-mast" 14 minutes ago Up 14 minutes salt | |
ec97c3fcdf1e salt-mi |
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
__author__ = 'Akhter Ali' | |
__date__ = '08/12/15' | |
__version__ = '0.1.0' | |
try: | |
import salt.cloud | |
CLOUDIMPORTED = True | |
print('salt.cloud successfully imported') | |
except ImportError: | |
CLOUDIMPORTED = False |
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
akhterpod01.dev.aws.resonatedigital.net: | |
The minion function caused an exception: Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1020, in _thread_return | |
return_data = func(*args, **kwargs) | |
File "/var/cache/salt/minion/extmods/modules/checkhighstate_test.py", line 37, in destroy | |
client.destroy(names=[minion_name]) | |
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 361, in destroy | |
mapper.destroy(names) | |
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1064, in destroy | |
', '.join(names) |