initial commit
commit
7c56c3268d
|
@ -0,0 +1,3 @@
|
|||
Vagrantfile
|
||||
.vagrant
|
||||
inventory.yml
|
|
@ -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 !
|
|
@ -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
|
Loading…
Reference in New Issue