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
[DEFAULT] | |
# email address to receive notifications. | |
destemail = root@localhost | |
# the email address from which to send emails. | |
sender = root@<fq-hostname> | |
# name on the notification emails. | |
sendername = Fail2Ban | |
# email transfer agent to use. | |
mta = sendmail |
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
--- | |
- name: installs fail2ban on ansible hosts | |
hosts: fail2ban-hosts | |
become: yes | |
tasks: | |
- name: install apt fail2ban packages | |
apt: | |
name: "{{ item }}" | |
state: latest |
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
## Note, this file is written by cloud-init on first boot of an instance | |
## modifications made here will not survive a re-bundle. | |
## if you wish to make changes you can: | |
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg | |
## or do the same in user-data | |
## b.) add sources in /etc/apt/sources.list.d | |
## c.) make changes to template file /etc/cloud/templates/sources.list.debian.tmpl | |
### | |
# See http://www.debian.org/releases/stable/i386/release-notes/ch-upgrading.html |
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
# https://meltdownattack.com | |
- name: Patch Linux systems against Meltdown and Spectre | |
hosts: "{{ target_hosts | default('all') }}" | |
become: yes | |
vars: | |
reboot_after_update: yes | |
packages: | |
# https://access.redhat.com/security/vulnerabilities/speculativeexecution |
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 = hosts |
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
[local] | |
localhost ansible_connection=local |
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
--- | |
- name: run the playbook tasks on the localhost | |
hosts: localhost | |
become: yes | |
tasks: | |
- name: print out the hostname of target | |
command: hostname | |
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/env bash | |
# Initial | |
DROPLET_OS=`lsb_release -a | tail -n 3 | sed -n '1p' | awk '{$1=""; print substr($0,2)}'` | |
DROPLET_LOCAL_TIME=`timedatectl | sed -n '1p' | awk '{$1=""; print substr($0,8)}'` | |
DROPLET_TIMEZONE=`timedatectl | sed -n '4p' | awk '{$1=""; print substr($0,8)}'` | |
# Basic info | |
DROPLET_HOSTNAME=`uname -n` | |
DROPLET_IP=`wget -qO - ifconfig.co` |
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
--- | |
provisioned_users: | |
- name: user-one | |
encrypted_password: $1$@YMgS-5Y$2lH.vkVmawJ810djjkGp70 | |
public_keys: | |
- /home/$USER/.ssh/id_rsa.pub | |
sudo: true | |
adm: true | |
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
provisioned_users: | |
- {name: user-one, encrypted_password: $1$@YMgS-5Y$2lH.vkVmawJ810djjkGp70, public_keys: [/home/$USER/.ssh/id_rsa.pub], sudo: true, adm: true} | |
- {name: user-two, encrypted_password: $1$@YMgS-5Y$2lH.vkVmawJ810djjkGp70, public_keys: [/home/$USER/.ssh/id_rsa.pub, /home/$USER/.ssh/id_rsa.pub], sudo: true, adm: true} | |
- {name: user-three, encrypted_password: $1$@YMgS-5Y$2lH.vkVmawJ810djjkGp70, public_keys: [/home/$USER/.ssh/id_rsa.pub, /home/$USER/.ssh/id_rsa.pub, /home/$USER/.ssh/id_rsa.pub], sudo: false, adm: false} | |
- {name: user-four, encrypted_password: $1$@YMgS-5Y$2lH.vkVmawJ810djjkGp70, public_keys: [/home/$USER/.ssh/id_rsa.pub, /home/$USER/.ssh/id_rsa.pub, /home/$USER/.ssh/id_rsa.pub, /home/$USER/.ssh/id_rsa.pub], sudo: false, adm: false} |
NewerOlder