initial commit

main
Winston Smith 2022-12-06 12:21:12 +01:00
commit 7c56c3268d
No known key found for this signature in database
GPG Key ID: DFD784DB2A6F7A07
3 changed files with 68 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
Vagrantfile
.vagrant
inventory.yml

13
README.md Normal file
View File

@ -0,0 +1,13 @@
# Ansible for Debian
## Why ?
Since I frequently install Debian servers, I wanted to make Ansible templates to ease-up redundant tasks.
So here is Ansible tasks related to that.
Since this repo is also a way to learn Ansible, feel free to drop by and give your thoughts ;)
## What ?
This script will do:
* Usually needed packages installation
* SSH configuration
* UFW configuration
* And more to come !
## Licence
A-GPL v3, as it should be !

52
deploy.yml Normal file
View File

@ -0,0 +1,52 @@
- hosts: debian_servers
become: true
tasks:
- name: Update and upgrade apt packages
apt:
upgrade: yes
update_cache: yes
cache_valid_time: 86400 #One day
- name: Install base tools
ansible.builtin.package:
name:
- dnsutils
- fail2ban
- fish
- htop
- net-tools
- tcpdump
- tmux
- ufw
- unattended-upgrades
- name: Install apt-transport-https
ansible.builtin.apt:
name:
- apt-transport-https
- ca-certificates
- lsb-release
- gnupg
state: latest
update_cache: true
- name: Add signing key
ansible.builtin.apt_key:
url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
state: present
- name: Add repository into sources list
ansible.builtin.apt_repository:
repo: "deb [arch={{ ansible_architecture }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable"
state: present
filename: docker
- name: Install Docker
ansible.builtin.apt:
name:
- docker
- docker.io
- docker-compose
- docker-registry
state: latest
update_cache: true