start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/sh | |
| # | |
| # About | |
| # ----- | |
| # This script sends simple system-metrics to a remote graphite server. | |
| # | |
| # | |
| # Metrics | |
| # ------- | |
| # The metrics currently include the obvious things such as: |
| #!/usr/bin/env bash | |
| group_name="$1" | |
| var_name="$2" | |
| var_value="$3" | |
| ./create_dynamic_vars_db.py | |
| sqlite3 dynamic_vars.db "INSERT OR REPLACE INTO group_vars ( group_name, var_name, var_value ) VALUES ( '${group_name}', '${var_name}', '${var_value}' );" |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| - name: schedule downtime | |
| uri: | |
| url: "https://{{ icinga_host }}:{{ icinga_port | default(5665) }}/v1/actions/schedule-downtime" | |
| user: "{{ icinga_user }}" | |
| password: "{{ icinga_password }}" | |
| force_basic_auth: True | |
| validate_certs: False | |
| method: POST | |
| headers: | |
| Accept: "application/json" |
If the Docker host is placed inside a proxy server, it needs to add the proxy configuration to each Dockerfile such as ENV http_proxy.
Following allows transparent access from the container to outside without any proxy configuration.
| global | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| chroot /var/lib/haproxy | |
| stats socket /run/haproxy/admin.sock mode 660 level admin | |
| stats timeout 30s | |
| user haproxy | |
| group haproxy | |
| daemon | |
| maxconn 2048 |
| --- | |
| ### ref: https://stackoverflow.com/questions/48825583/in-ansible-how-do-you-change-a-existing-dictionary-hash-values-using-a-variable | |
| - name: replace the value of dictionary variable | |
| hosts: localhost | |
| gather_facts: no | |
| vars: | |
| fact_process: | |
| cmd_check: ok | |
| cmd_name: node1 | |
| cmd_status: error |
| #!/usr/bin/python | |
| # | |
| # LICENSE: MIT | |
| # | |
| # Copyright (C) 2014 Samuel Stauffer | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to | |
| # deal in the Software without restriction, including without limitation |
| # Code licensed LGPLv3 by Jérémie Lumbroso <lumbroso@cs.princeton.edu> | |
| import difflib | |
| import itertools | |
| import textwrap | |
| import typing | |
| def side_by_side( | |
| left: typing.List[str], |