Skip to content

Instantly share code, notes, and snippets.

devinnasar

Block or report user

Report or block devinnasar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@devinnasar
devinnasar / freshclam comment
Created Feb 27, 2018
This fails when the string actually isn't in the file
View freshclam comment
freshclam_confirm_sysconfig_exists:
file.exists:
- name: {{ freshclam.sysconfig_path }}/freshclam
freshclam_enable_cron_script:
file.comment:
- name: {{ freshclam.sysconfig_path }}/freshclam
- regex: 'FRESHCLAM_DELAY=disabled-warn'
- char: '#'
- require:
View sort_s3_paths_by_date.sh
# Gets the most recent directory under an s3 path
aws s3 ls "${_s3socpath}/tc-east-10/" | # list contents of s3 path
grep "PRE" | # filter for PRE (prefix) entries
awk '{printf $2"\n"}' | # print the second column of output (remove the PRE column)
sed 's/\/$//' | # cut the trailing slash off of paths
sort -r -n -t"-" -k1 -k2 -k3 | # sort the output: reverse, with a delimiter of hyphen ('-'), by the year, then month, then date
sed -n 1p # return the first line of output only
@devinnasar
devinnasar / mySrcDiff.diff
Created Jun 21, 2017
can I get diff to not place the timestamp in these files?
View mySrcDiff.diff
diff -ur '--exclude=3502_03' 2017-05-23/3301_03/workstation_patch_status 2017-06-02/3301_03/workstation_patch_status
--- 2017-05-23/3301_03/workstation_patch_status 2017-05-23 00:07:57.000000000 -0400 <-- this last part
+++ 2017-06-02/3301_03/workstation_patch_status 2017-06-02 11:55:10.000000000 -0400
@@ -23,7 +23,7 @@
...
View gist:6f96205720aa4bc21562dd81cd626d8c
# State
# Blacklist
ipset_set_blacklist_exists:
ipset.set_present:
- name: blacklist
- set_type: hash:ip
- hashsize: 4096
- family: ipv4
- comment: blackist
@devinnasar
devinnasar / gist:3948416b9657ba4d3715ea8c9f5ce156
Created May 26, 2017
What's going on here? It ran the first state then said it couldn't find the second state
View gist:3948416b9657ba4d3715ea8c9f5ce156
ID: clamd_config
Function: file.managed
Name: /etc/clamd.d/scan.conf
Result: True
Comment: File /etc/clamd.d/scan.conf updated
Started: 15:50:58.259184
Duration: 168.688 ms
Changes:
----------
diff:
@devinnasar
devinnasar / gist:5ce84967251d5c08465d52cc56e486ca
Created May 24, 2017
salt-cloud doesn't like my profile...
View gist:5ce84967251d5c08465d52cc56e486ca
# provider
aws-ec2-east:
driver: ec2
id: <obfuscated>
key: <obfuscated>
keyname: salt-e
minion:
master: <obfuscated>
private_key: /root/.ssh/salt-e.pem
ssh_interface: private_ips
View gist:171e9affb3fa83dcb6d2ef8f8fbf7e7f
[root@OTCMVM0000 master.d]# salt-run git_pillar.update -l trace
[DEBUG ] Missing configuration file: /etc/salt/master
[DEBUG ] Including configuration from '/etc/salt/master.d/engine.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/engine.conf
[DEBUG ] Including configuration from '/etc/salt/master.d/f_defaults.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/f_defaults.conf
[DEBUG ] Including configuration from '/etc/salt/master.d/lxc_profiles.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/lxc_profiles.conf
[DEBUG ] Including configuration from '/etc/salt/master.d/reactor.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/reactor.conf
View gist:085fefe8a59a993cc98b7e06faa26a45
[root@OTCMVM0000 master.d]# salt-run git_pillar.uplate -l trace
[DEBUG ] Missing configuration file: /etc/salt/master
[DEBUG ] Including configuration from '/etc/salt/master.d/engine.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/engine.conf
[DEBUG ] Including configuration from '/etc/salt/master.d/f_defaults.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/f_defaults.conf
[DEBUG ] Including configuration from '/etc/salt/master.d/lxc_profiles.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/lxc_profiles.conf
[DEBUG ] Including configuration from '/etc/salt/master.d/reactor.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/reactor.conf
View gist:061dbd2396cb89f5a1a3472dd3b00092
# Remote pillar information
2017-05-23 18:08:19,546 [salt.utils.gitfs ][DEBUG ][11994] Fetching git_pillar remote 'master git@bitbucket.org:opentempo/salt-pillar.git'
2017-05-23 18:08:19,747 [salt.utils.gitfs ][DEBUG ][11994] git_pillar remote 'master git@bitbucket.org:opentempo/salt-pillar.git' is up-to-date
2017-05-23 18:08:19,748 [salt.utils.gitfs ][DEBUG ][11994] pygit2 does not support detecting stale refs for authenticated remotes, saltenvs will not reflect branches/tags removed from remote 'master git@bitbucket.org:opentempo/salt-pillar.git'
2017-05-23 18:08:19,748 [salt.utils.gitfs ][DEBUG ][11994] Removed update lock for git_pillar remote 'master git@bitbucket.org:opentempo/salt-pillar.git'
# Attempted highstate.
[root@OTCMVM0000 master.d]# salt -G 'role_code:CM' state.apply highstate
[DEBUG ] Configuration file path: /etc/salt/master
[WARNING ] In
View gist:17005c2ce7ab6f44b26e8b90f0c32434
pygit-deps: # State
pkg.group_installed:
- name: Development Tools
pkg.installed:
- pkgs:
- cmake
- gcc
- http-parser-devel
You can’t perform that action at this time.