aboutsummaryrefslogtreecommitdiffstats
path: root/roles/common
diff options
context:
space:
mode:
Diffstat (limited to 'roles/common')
-rw-r--r--roles/common/tasks/extrapkg.yml24
-rw-r--r--roles/common/tasks/main.yml117
-rw-r--r--roles/common/tasks/ntp.yml2
-rw-r--r--roles/common/tasks/security.yml15
-rw-r--r--roles/common/templates/etc_fail2ban_jail.local.j24
-rw-r--r--roles/common/templates/root_gitconfig.j22
6 files changed, 88 insertions, 76 deletions
diff --git a/roles/common/tasks/extrapkg.yml b/roles/common/tasks/extrapkg.yml
index 0836912..79e08cb 100644
--- a/roles/common/tasks/extrapkg.yml
+++ b/roles/common/tasks/extrapkg.yml
@@ -1,17 +1,17 @@
---
- name: Install extras that Everybody wants
- apt: pkg={{ item }} state=installed
- with_items:
- - ack-grep
- - alpine
- - build-essential
- - cowsay
- - ctorrent
- - figlet
- - ipython
- - ipython3
- - lynx
- - manpages-dev
+ apt:
+ state: present
+ name:
+ - ack-grep
+ - alpine
+ - build-essential
+ - cowsay
+ - ctorrent
+ - figlet
+ - ipython3
+ - lynx
+ - manpages-dev
tags:
- dependencies
diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml
index a4818b0..ec5ad7b 100644
--- a/roles/common/tasks/main.yml
+++ b/roles/common/tasks/main.yml
@@ -11,58 +11,71 @@
- dependencies
- name: Install necessities and nice-to-haves
- apt: pkg={{ item }} state=installed
- with_items:
- - apt-transport-https
- - apticron
- - aptitude
- - bzip2
- - ca-certificates
- - curl
- - debian-goodies
- - dialog
- - dnsutils
- - etckeeper
- # fail2ban in security
- - file
- - git
- - htop
- - iftop
- - ifupdown
- - iotop
- - iproute
- - iputils-ping
- - isc-dhcp-client
- - less
- - libui-dialog-perl
- - locales
- - locales-all
- - lsof
- - lvm2
- - man-db
- - manpages-dev
- - molly-guard
- - mosh
- - mtr-tiny
- - netbase
- - netcat
- - net-tools
- - ngrep
- - openssh-server
- - openssl
- - pv
- - python
- - python-software-properties
- # rkhunter in security
- - screen
- - sudo
- - tcpdump
- - tree
- - unzip
- - unattended-upgrades
- - util-linux
- - vim-nox
- - wget
+ apt:
+ state: present
+ name:
+ # fail2ban in security
+ # rkhunter in security
+ - apt-transport-https
+ - apticron
+ - aptitude
+ - bash-completion
+ - bzip2
+ - ca-certificates
+ - curl
+ - debian-goodies
+ - dialog
+ - dnsutils
+ - dstat
+ - etckeeper
+ - fd-find
+ - file
+ - git
+ - htop
+ - httpie
+ - iftop
+ - ifupdown
+ - iotop
+ - iproute
+ - iputils-ping
+ - isc-dhcp-client
+ - jq
+ - less
+ - libui-dialog-perl
+ - lnav
+ - locales
+ - locales-all
+ - lsof
+ - lvm2
+ - man-db
+ - manpages-dev
+ - molly-guard
+ - moreutils
+ - mosh
+ - mtr-tiny
+ - net-tools
+ - netbase
+ - netcat
+ - ngrep
+ - openssh-server
+ - openssl
+ - parallel
+ - pigz
+ - pv
+ - python3
+ - python3-software-properties
+ - ripgrep
+ - screen
+ - sqlite3
+ - sudo
+ - tcpdump
+ - tree
+ - unattended-upgrades
+ - unzip
+ - util-linux
+ - vim-nox
+ - wget
+ - zip
tags:
- dependencies
diff --git a/roles/common/tasks/ntp.yml b/roles/common/tasks/ntp.yml
index c1489fd..219cdb5 100644
--- a/roles/common/tasks/ntp.yml
+++ b/roles/common/tasks/ntp.yml
@@ -2,7 +2,7 @@
# Defines tasks applicable for NTP (Network Time Protocol)
- name: Install ntp
- apt: pkg=ntp state=installed
+ apt: name=ntp state=present
tags:
- dependencies
diff --git a/roles/common/tasks/security.yml b/roles/common/tasks/security.yml
index c00b941..df2f065 100644
--- a/roles/common/tasks/security.yml
+++ b/roles/common/tasks/security.yml
@@ -1,12 +1,13 @@
---
- name: Install security-related packages
- apt: pkg={{ item }} state=installed
- with_items:
- - fail2ban
- - whois
- - lynis
- - rkhunter
- - debsums
+ apt:
+ state: present
+ name:
+ - fail2ban
+ - whois
+ - lynis
+ - rkhunter
+ - debsums
tags:
- dependencies
diff --git a/roles/common/templates/etc_fail2ban_jail.local.j2 b/roles/common/templates/etc_fail2ban_jail.local.j2
index 35c161c..57e4dc2 100644
--- a/roles/common/templates/etc_fail2ban_jail.local.j2
+++ b/roles/common/templates/etc_fail2ban_jail.local.j2
@@ -8,7 +8,7 @@ banaction = iptables-multiport
action = %(action_)s
# JAILS
-[ssh]
+[sshd]
enabled = true
maxretry = 8
@@ -16,7 +16,7 @@ maxretry = 8
enabled = true
banaction = iptables-allports
-[ssh-ddos]
+[sshd-ddos]
enabled = true
[postfix]
diff --git a/roles/common/templates/root_gitconfig.j2 b/roles/common/templates/root_gitconfig.j2
index 90c7151..eeb8a44 100644
--- a/roles/common/templates/root_gitconfig.j2
+++ b/roles/common/templates/root_gitconfig.j2
@@ -1,5 +1,3 @@
- git config --global user.name "Your Name"
- git config --global user.email you@example.com
[user]
name = root
email = root@{{ hostname_fqdn }}