Simple service and timer for the apt.sh
metrics script from the Prometheus community script collection.
Used on a Debianite system with the Debian repository version of node-exporter
, YMMV. puppet/prometheus
uses node-exporter
as the group by default, can be changed by setting prometheus::node_exporter::group
via hiera/resource parameter.
Alternative uses with ACLs are possible; one would have to investigate if the DynamicUser
overlay would work for deleting files from a directory.
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/perl | |
use Env; | |
use strict; | |
my $device = 'enp0s25'; | |
my $connection = 'Hotspot'; | |
my @hotspot_connections = ( | |
'4d2eab82-e19c-4c0b-8305-e0eacc24a67a', | |
'1decf25a-da88-48e1-9077-3f9b883f92b3', |
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
require 'facter' | |
Facter.add(:users) do | |
setcode do | |
users = [] | |
File.open('/etc/passwd', 'r').readlines.each do |line| | |
if /^[^#:]+:[^:]+:[^:]+:[^:]+:[^:]+:[^:]+:[^:]+$/.match?(line) | |
users.push(line[/^(?<user>[^:]+)/, 'user']) | |
end | |
end | |
users |
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 | |
EVENT_NAME="$1" | |
CH_HOSTNAME="$2" | |
CH_TARGET_FILENAME="$3" | |
CH_TXT_VALUE="$4" | |
case "${EVENT_NAME}" in | |
challenge-dns-start) | |
echo "Use the following TXT value: _acme-challenge.${CH_HOSTNAME} TXT ${CH_TXT_VALUE}" | |
echo 'Waiting for 300 seconds' |
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/sh | |
set -e | |
EVENT_NAME="$1" | |
[ "$EVENT_NAME" = "live-updated" ] || exit 42 | |
if [ ! -e "${ACME_STATE_DIR}" ]; then | |
exit 42 | |
fi |
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
[defaults] | |
hostfile = some-environment | |
vault_password_file = bin/gpg-wrapper.sh |
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/perl | |
## vim: set syn=on ts=4 sw=4 sts=0 et foldmethod=indent: | |
## purpose: check if value exists in multi-valued ou | |
## copyright: B1 Systems GmbH <info@b1-systems.de>, 2018. | |
## license: GPLv3+, http://www.gnu.org/licenses/gpl-3.0.html | |
## author: Tobias Wolter <tobias.wolter@b1-systems.de>, 2018. | |
## version: 1.0 | |
## Source for this is the verify-cn sample from OpenVPN: | |
## https://github.com/OpenVPN/openvpn/blob/master/sample/sample-scripts/verify-cn |
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
GIT | |
remote: https://github.com/skywinder/github-changelog-generator | |
revision: 5d7f18bc415e9a2c27769b7ea0adb9bc18b285c0 | |
specs: | |
github_changelog_generator (1.15.0.pre.rc) | |
activesupport | |
faraday-http-cache | |
multi_json | |
octokit (~> 4.6) | |
rainbow (>= 2.2.1) |
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
Dec 12 22:26:38 debian9-64-1 systemd[1]: Starting Corosync Cluster Engine... | |
Dec 12 22:26:38 debian9-64-1 corosync[2812]: [MAIN ] Corosync Cluster Engine ('2.4.2'): started and ready to provide service. | |
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [MAIN ] Corosync Cluster Engine ('2.4.2'): started and ready to provide service. | |
Dec 12 22:26:39 debian9-64-1 corosync[2812]: info [MAIN ] Corosync built-in features: dbus rdma monitoring watchdog augeas systemd upstart xmlconf qdevices qnetd snmp pie relro b | |
indnow | |
Dec 12 22:26:38 debian9-64-1 corosync[2812]: [MAIN ] Corosync built-in features: dbus rdma monitoring watchdog augeas systemd upstart xmlconf qdevices qnetd snmp pie relro bindnow | |
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [TOTEM ] Initializing transport (UDP/IP Multicast). | |
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [TOTEM ] Initializing transmit/receive security (NSS) crypto: aes256 hash: sha1 | |
Dec 12 22:26:39 debian9-64-1 corosync[2812]: [TOTEM ] Initializing transp |
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
# There's another method I spotted in trombik/ansible-role-dovecot. In the playbook, do this: | |
- name: Include OS-specific variables | |
include_vars: "{{ ansible_os_family }}.yml" | |
# In {{ ansible_os_family }}.yml: | |
__rolename_variable: some_value | |
# In defaults/main.yml: | |
rolename_variable: "{{ __rolename_variable }}" |