Premier commit
This commit is contained in:
49
roles/base/tasks/main.yml
Normal file
49
roles/base/tasks/main.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
|
||||
- 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: 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"
|
Reference in New Issue
Block a user