--- - 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: Installe dnsmasq, git, ansible apt: state: present name: - dnsmasq - git - ansible - name: Desinstall paquets apt: state: absent name: - nfs-common - rpcbind - bluetooth - name: Configure Vim alternatives: name: editor path: /usr/bin/vim - name: active routage sysctl: name: net.ipv4.ip_forward value: "1" sysctl_set: yes state: present reload: yes - 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 dnsmasq.conf copy: src: files/dnsmasq.conf dest: /etc/ - name: redémarre dnsmasq service: name: dnsmasq state: restarted - name: copie cle publique ssh authorized_key: user: debian state: present key: "{{ lookup('file','keys/id_rsa.pub')}}"