gsb2021/roles/base/tasks/main.yml
2021-04-15 16:45:05 +02:00

58 lines
1.1 KiB
YAML

---
- name: Copie sources.list
copy: src=sources.list.{{ ansible_distribution }} dest=/etc/apt/sources.list
- name: Copie apt.conf pour proxy
copy: src=apt.conf dest=/etc/apt/apt.conf
when: ansible_hostname != "s-adm"
- 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
apt:
state: present
name:
- vim
- ntp
- mc
- tcpdump
- curl
- net-tools
- rsync
- sudo
- name: Desinstall paquets
apt:
state: absent
name:
- nfs-common
- rpcbind
- bluetooth
- name: Configure Vim
alternatives: name=editor path=/usr/bin/vim
#- name: copie fichier
# copy: src=mesg.txt dest=/root/tools/mesg.txt
- name: Generation /etc/hosts
template: src=hosts.j2 dest=/etc/hosts
when: ansible_hostname != "s-proxy"
- name: Generation /etc/hosts pour s-proxy
template: src=hosts.s-proxy.j2 dest=/etc/hosts
when: ansible_hostname == "s-proxy"