gsbt/miniinf-infra.yml
2022-12-17 21:27:05 +01:00

80 lines
1.5 KiB
YAML

---
- hosts: all
become: yes
# become_user: debian
tasks:
- name: Copie apt.conf pour proxy
copy:
src: files/apt.conf
dest: /etc/apt/apt.conf
- name: Copie resolv.conf
copy:
src: files/resolv.conf
dest: /etc/
- name: Copie apt.conf pour proxy
copy:
src: apt.conf
dest: /etc/apt/apt.conf
#
#
#- name: Sysctl desactive ipv6
# sysctl:
# name: net.ipv6.conf.all.disable_ipv6
# value: 1
# sysctl_set: yes
# state: present
# reload: yes
- name: Update + Upgrade
apt:
upgrade: yes
update_cache: yes
cache_valid_time: 86400 #One day
- name: Install paquets tcpdump curl rsync sudo iptables
apt:
state: present
name:
- tcpdump
- curl
- rsync
- sudo
- iptables
- name: Desinstall paquets
apt:
state: absent
name:
- nfs-common
- rpcbind
- bluetooth
- name: Configure Vim
alternatives:
name: editor
path: /usr/bin/vim
- name: Desactive IPV6 avec sysctl
sysctl:
name: "{{ item }}"
value: "1"
state: present
reload: yes
with_items:
- net.ipv6.conf.all.disable_ipv6
- net.ipv6.conf.default.disable_ipv6
- net.ipv6.conf.lo.disable_ipv6
- name: copie cle publique ssh
authorized_key:
user: debian
state: present
key: "{{ lookup('file','keys/id_rsa.pub')}}"
roles:
- dhcp-server
- dns-master