--- - hosts: hotes become: yes become_user: root tasks: - name: creation de sioadm user: name: sioadm state: present groups: sudo append: yes password: "{{ 'sioadm' | password_hash('sha512') }}" password_lock: yes - name: desinstaller le paquet wpasupplicant apt: name: wpasupplicant state: absent - name: desinstaller le paquet rpcbind apt: name: rpcbind state: absent - name: ecriture fichier resolv.conf template: src: resolv.conf dest: "/etc/resolv.conf" - name: configuration sshd_config replace: dest: /etc/ssh/sshd_config regexp: '^PermitRootLogin (yes|without-password)' regexp: '^PermitRootLogin (yes|without-password|prohibit-password)' replace: "PermitRootLogin no"