Skip to content

Instantly share code, notes, and snippets.

@richlv
richlv / nuke_trailing_whitespace.patch
Created April 25, 2012 08:57
fping3 trailing whitespace removal
diff -ur schweikert-fping-8047122//README modified//README
--- schweikert-fping-8047122//README 2012-02-23 23:42:00.000000000 +0200
+++ modified//README 2012-04-25 11:52:39.538064725 +0300
@@ -32,4 +32,4 @@
Original author: Roland Schemers (schemers@stanford.edu)
Previous maintainer: RL "Bob" Morgan (morgan@stanford.edu)
IPv6 Support: Jeroen Massar (jeroen@unfix.org / jeroen@ipng.nl)
- to enable IPV6 compile with -DIPV6
+ to enable IPV6 compile with -DIPV6
diff -ur schweikert-fping-8047122//src/fping.c modified//src/fping.c
--- possible input :
key [t|a]
<style type="text/css"><!--/*--><![CDATA[/*><!--*/
key2[param] [u|1]
something else
key3[[param,param],param] [z|44]
--- desired output (validating trimmed $1 for something like [a-zA-Z0-9\[*] ):
> ansible-playbook group zabbix-agent.yml
PLAY [Configure Zabbix agent] **************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************************
ok: [host41.example.com]
ok: [host40.example.com]
ok: [host42.example.com]
ok: [host4.example.com]
changed: [host4.example.com] => (item=Server)
Tables:
thing
thingid, thingname
10, athing
11, bthing
12, cthing
entity
entityid, entityname, thingid
use strict;
use warnings;
use Data::Dumper;
use Minion;
use Minion::Backend::SQLite;
my $minion = Minion->new(SQLite => 'sqlite:testing.db');
$minion->on(worker => sub {
body:
aliases:
"{{ls_segment}}-{{item.1.file}}_rollover": {}
- name: "Create ES index that's missing"
local_action:
module: uri
url: 'http://{{es_server}}:9200/{{ls_segment}}-{{item.1.file}}-000001'
method: PUT
status_code: 200
body:
aliases:
"{{ls_segment}}-{{item.1.file}}_rollover": {}
===== Variables:
action_common_keys:
server_url: "http://localhost/"
login_user: api_cli
login_password: "{{api_cli_password}}"
state: present
status: enabled
actions_discovery:
- name: Import Zabbix templates
zabbix_template:
server_url: "http://localhost/zabbix/"
login_user: zbx_api_cli
login_password: "{{zbx_api_cli_password}}"
template_name: "{{item}}"
template_json: "{{ lookup('file', 'files/zabbix-templates/zbx_template-' + item + '.json') }}"
state: present
tags: zabbixtemplate
loop: "{{zabbix_templates}}"
failed: [target.host] (item=HS Template App App) => {"changed": false, "item": "HS Template App App", "module_stderr": "Shared connection to howl.incert.motive.com closed.
", "module_stdout": "Traceback (most recent call last):
File \"/tmp/ansible_LjKS35/ansible_module_zabbix_template.py\", line 555, in <module>
main()
File \"/tmp/ansible_LjKS35/ansible_module_zabbix_template.py\", line 540, in main
child_template_ids, macros)
File \"/tmp/ansible_LjKS35/ansible_module_zabbix_template.py\", line 270, in add_template
'macros': macros})
File \"/usr/lib/python2.7/site-packages/zabbix_api.py\", line 329, in method
return self.universal(\"%s.%s\" % (self.data[\"prefix\"], name), opts[0])