This is my docker systemd setup. I stored no configs or environment vars in this gist.
# Install Dependencies
$ sudo apt-get update
$ sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
#!/usr/bin/env python | |
#coding=utf-8 | |
import apt | |
import apt_pkg | |
from time import strftime | |
import os | |
import subprocess | |
import sys |
# Check OS and VERSION | |
if [ -f /etc/os-release ]; then | |
# freedesktop.org and systemd | |
. /etc/os-release | |
OS=$ID | |
VER=$VERSION_ID | |
elif type lsb_release >/dev/null 2>&1; then | |
# linuxbase.org | |
OS=$(lsb_release -si) | |
VER=$(lsb_release -sr) |
--- | |
- name: yum check-update | |
shell: yum check-update | |
register: yum_result | |
failed_when: yum_result.rc != 100 |
--- | |
#source: https://serverfault.com/a/883713 | |
- hosts: ubuntu | |
tasks: | |
- name: install all updates | |
apt: | |
upgrade: dist | |
update_cache: yes | |
autoremove: yes | |
autoclean: yes |
--- | |
- hosts: all | |
become: yes | |
tasks: | |
- name: Install system updates for centos systems | |
yum: | |
name: '*' | |
state: latest |
#http://www.oidview.com/mibs/0/IF-MIB.html | |
#http://www.net-snmp.org/docs/mibs/interfaces.html | |
cisco_custom: | |
version: 2 | |
auth: | |
community: public | |
walk: | |
- 1.3.6.1.2.1.2.2.1 | |
- 1.3.6.1.2.1.31.1.1.1 | |
metrics: |
#file /etc/sysconfig/slapd | |
# OpenLDAP server configuration | |
# see 'man slapd' for additional information | |
# Where the server will run (-h option) | |
# - ldapi:/// is required for on-the-fly configuration using client tools | |
# (use SASL with EXTERNAL mechanism for authentication) | |
# - default: ldapi:/// ldap:/// | |
# - example: ldapi:/// ldap://127.0.0.1/ ldap://10.0.0.1:1389/ ldaps:/// | |
SLAPD_URLS="ldap:/// ldaps:///" |
#!/bin/sh | |
# @author: Alexandre Plennevaux | |
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP | |
# | |
# FTP LOGIN | |
HOST='sftp://ftp.domain.com' | |
USER='ftpusername' | |
PASSWORD='ftppassword' | |
# DISTANT DIRECTORY |
This gist is a compilation of two tutorials. You can find the original tutorials here and here. What should you know before using this? Everything can be executed from the home folder. For easier cleanup at the end you can make directory where you'll download everything, and then just use rm -rf .
. Although, you should be careful. If some strange bugs arise unexpectedly somewhere sometimes, just keep in mind that some user names have underscores in them (this is probably nothing to worry about).
sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Prometheus Monitoring User" prometheus
sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Node Exporter User" node_exporter
sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Alertm