diff --git a/roles/base/tasks/ansible-pull.yml b/roles/base/tasks/ansible-pull.yml index e7212a9..56d8b63 100644 --- a/roles/base/tasks/ansible-pull.yml +++ b/roles/base/tasks/ansible-pull.yml @@ -4,7 +4,6 @@ apt: name: ansible state: present - become: yes - name: Updating ansible-pull custom scripts get_url: diff --git a/roles/base/tasks/desktop-environment.yml b/roles/base/tasks/desktop-environment.yml index bbfd0db..878ee60 100644 --- a/roles/base/tasks/desktop-environment.yml +++ b/roles/base/tasks/desktop-environment.yml @@ -7,13 +7,11 @@ register: check_edubuntu_pkg changed_when: check_edubuntu_pkg.rc != 0 tags: edu-install - become: yes - name: Installation of the desktop environment shell: "DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -y install edubuntu-desktop-gnome^" when: check_edubuntu_pkg|changed tags: edu-install - become: yes - name: Change default desktop environment replace: diff --git a/roles/base/tasks/packages.yml b/roles/base/tasks/packages.yml index 2466665..45147b1 100644 --- a/roles/base/tasks/packages.yml +++ b/roles/base/tasks/packages.yml @@ -7,7 +7,6 @@ state: absent purge: yes with_items: "{{ base_common_delpkg }}" - become: yes - name: Removing packages from client machines apt: @@ -15,7 +14,6 @@ state: absent purge: yes with_items: "{{ base_client_delpkg }}" - become: yes when: ansible_local.noderole.role == 'client' and base_client_delpkg|length > 0 - name: Removing packages from docenti machines @@ -24,14 +22,12 @@ state: absent purge: yes with_items: "{{ base_docenti_delpkg }}" - become: yes when: ansible_local.noderole.role == 'docenti' and base_docenti_delpkg|length > 0 - name: Cleanup of unneeded packages shell: apt-get -y autoremove register: autoremove changed_when: "'Rimozione' in autoremove.stdout" - become: yes - name: Installing additional common packages apt: @@ -39,14 +35,12 @@ state: installed with_items: "{{ base_common_addpkg }}" tags: edu-install - become: yes - name: Installing additional packages for client role apt: pkg: '{{ item }}' state: present with_items: "{{ base_client_addpkg }}" - become: yes when: ansible_local.noderole.role == 'client' and base_client_addpkg|length > 0 - name: Installing additional packages for docenti role @@ -54,7 +48,6 @@ pkg: '{{ item }}' state: present with_items: "{{ base_docenti_addpkg }}" - become: yes when: ansible_local.noderole.role == 'docenti' and base_docenti_addpkg|length > 0 - name: Correggo NetworkManager per gestire la rete diff --git a/roles/base/tasks/system-update.yml b/roles/base/tasks/system-update.yml index 0fb9d16..3d0f243 100644 --- a/roles/base/tasks/system-update.yml +++ b/roles/base/tasks/system-update.yml @@ -5,9 +5,7 @@ apt: update_cache: yes cache_valid_time: 180 - become: yes - name: Upgrading system apt: upgrade: full - become: yes diff --git a/roles/base/tasks/virtualbox-guest-addons.yml b/roles/base/tasks/virtualbox-guest-addons.yml index a6d2dac..530d9df 100644 --- a/roles/base/tasks/virtualbox-guest-addons.yml +++ b/roles/base/tasks/virtualbox-guest-addons.yml @@ -6,4 +6,3 @@ pkg: virtualbox-guest-dkms stat: present when: ansible_product_name == "VirtualBox" - become: yes diff --git a/roles/client/handlers/main.yml b/roles/client/handlers/main.yml index 574e753..5740a84 100644 --- a/roles/client/handlers/main.yml +++ b/roles/client/handlers/main.yml @@ -2,6 +2,5 @@ - name: reboot shell: shutdown -r now "Reboot by Ansible." - become: yes async: 0 poll: 0 diff --git a/roles/client/tasks/epoptes.yml b/roles/client/tasks/epoptes.yml index 49e1397..8008985 100644 --- a/roles/client/tasks/epoptes.yml +++ b/roles/client/tasks/epoptes.yml @@ -35,7 +35,6 @@ - name: Getting the epoptes server certificate shell: /usr/sbin/epoptes-client -c - become: yes when: crt_epo_exists|failed # I don't notify anymore, hoping that this would be done on first run after # preseed and it should restart because of domain join. diff --git a/roles/custom/tasks/custom.yml b/roles/custom/tasks/custom.yml index 964130f..d4b6c79 100644 --- a/roles/custom/tasks/custom.yml +++ b/roles/custom/tasks/custom.yml @@ -5,11 +5,9 @@ name: plymouth-theme-edubuntu-bglug state: present force: yes - become: yes - name: Installing lightdm wallpaper apt: name: bglug-artwork state: present force: yes - become: yes diff --git a/roles/custom/tasks/unattended-upgrades.yml b/roles/custom/tasks/unattended-upgrades.yml index 96c28cf..bc31daa 100644 --- a/roles/custom/tasks/unattended-upgrades.yml +++ b/roles/custom/tasks/unattended-upgrades.yml @@ -4,7 +4,6 @@ apt: name: "{{ item }}" state: present - become: yes with_items: - unattended-upgrades - update-notifier-common diff --git a/roles/docenti/tasks/epoptes.yml b/roles/docenti/tasks/epoptes.yml index f4ee97b..55ed9b3 100644 --- a/roles/docenti/tasks/epoptes.yml +++ b/roles/docenti/tasks/epoptes.yml @@ -9,11 +9,9 @@ - name: Stopping epoptes SysV daemon shell: /etc/init.d/epoptes stop - become: yes - name: Disabling sysv start shell: /usr/sbin/update-rc.d -f epoptes remove - become: yes - name: Installing upstart service copy: @@ -25,4 +23,3 @@ - name: Starting epoptes from upstart shell: /sbin/start epoptes - become: yes diff --git a/roles/domain/handlers/main.yml b/roles/domain/handlers/main.yml index 574e753..5740a84 100644 --- a/roles/domain/handlers/main.yml +++ b/roles/domain/handlers/main.yml @@ -2,6 +2,5 @@ - name: reboot shell: shutdown -r now "Reboot by Ansible." - become: yes async: 0 poll: 0 diff --git a/roles/domain/tasks/audio.yml b/roles/domain/tasks/audio.yml index d2a8156..6b39b1e 100644 --- a/roles/domain/tasks/audio.yml +++ b/roles/domain/tasks/audio.yml @@ -11,7 +11,6 @@ service: name: pulseaudio state: started - become: yes - name: "Configuring client options" lineinfile: @@ -24,7 +23,6 @@ - name: Disabling pulseaudio startup on lightdm shell: chmod -x /usr/bin/start-pulseaudio-x11 - become: yes - name: Adding pulseaudio fixing script at reboot. lineinfile: diff --git a/roles/domain/tasks/domain_join.yml b/roles/domain/tasks/domain_join.yml index 8b8c35a..82fa057 100644 --- a/roles/domain/tasks/domain_join.yml +++ b/roles/domain/tasks/domain_join.yml @@ -3,14 +3,12 @@ - name: Checking domain join shell: wbinfo -t - become: yes register: check_domain changed_when: check_domain.rc != 0 ignore_errors: yes - name: Joining domain shell: 'net rpc join -U admin%{{ domainadminpasswd }}' - become: yes when: check_domain|changed register: domainjoin notify: diff --git a/roles/domain/tasks/glib2.yml b/roles/domain/tasks/glib2.yml index 9ba8793..a6f018a 100644 --- a/roles/domain/tasks/glib2.yml +++ b/roles/domain/tasks/glib2.yml @@ -24,5 +24,4 @@ - name: Recompiling glib2 schemas shell: glib-compile-schemas --strict /usr/share/glib-2.0/schemas/ - become: yes when: cfg_glib_users|changed or cfg_glib_mounted|changed or cfg_keyb_layout|changed diff --git a/roles/domain/tasks/main.yml b/roles/domain/tasks/main.yml index 0ff1110..d81c54f 100644 --- a/roles/domain/tasks/main.yml +++ b/roles/domain/tasks/main.yml @@ -54,4 +54,3 @@ - name: Updating local version for repo shell: 'rm -f {{ ansible_local.checksum.repover_file }} && echo "{{ ansible_local.checksum.repover }}" > {{ ansible_local.checksum.repover_file }}' - become: yes diff --git a/roles/domain/tasks/ntp.yml b/roles/domain/tasks/ntp.yml index da09d81..bb69ae0 100644 --- a/roles/domain/tasks/ntp.yml +++ b/roles/domain/tasks/ntp.yml @@ -5,7 +5,6 @@ apt: name: ntp state: present - become: yes - name: Configuring NTP template: @@ -27,5 +26,4 @@ - name: Restarting NTP service shell: service ntp restart - become: yes when: cfg_ntp|changed diff --git a/roles/domain/tasks/pam_base.yml b/roles/domain/tasks/pam_base.yml index c26cb0d..6f265f9 100644 --- a/roles/domain/tasks/pam_base.yml +++ b/roles/domain/tasks/pam_base.yml @@ -5,7 +5,6 @@ apt: name: libpam-winbind state: present - become: yes # Leaving them here commented, as they may be needed in the future # for improvements on login times. @@ -17,14 +16,12 @@ # dest: /etc/pam.d/common-auth # regexp: '^.*pam_unix\.so.*nullok_secure$' # replace: 'auth [success=1 default=ignore] pam_unix.so nullok_secure try_first_pass' -# become: yes # #- name: 'common-auth: rimuovo config auto pam_winbind' # lineinfile: # dest: /etc/pam.d/common-auth # regexp: 'pam_winbind\.so krb5' # state: absent -# become: yes # #- name: 'common-auth: aggiunta pam_winbind' # lineinfile: @@ -33,7 +30,6 @@ # insertbefore: '^auth.*pam_unix\.so' # line: 'auth [success=2 default=ignore] pam_winbind.so' # state: present -# become: yes ## common-password # @@ -43,7 +39,6 @@ # regexp: '^(password.*pam_unix\.so.*sha512)$' # replace: '\1 min=4 max=20' # backup: yes -# become: yes # ## common-session # @@ -55,4 +50,3 @@ # line: 'session required pam_mkhomedir.so umask=0022 skel=/etc/skel silent' # state: present # backup: yes -# become: yes diff --git a/roles/domain/tasks/pam_mount.yml b/roles/domain/tasks/pam_mount.yml index 48771e4..c08c9fa 100644 --- a/roles/domain/tasks/pam_mount.yml +++ b/roles/domain/tasks/pam_mount.yml @@ -5,7 +5,6 @@ apt: name: libpam-mount state: present - become: yes - name: Configuring pam_mount template: diff --git a/roles/domain/tasks/pkgs.yml b/roles/domain/tasks/pkgs.yml index e00ceea..83e39b3 100644 --- a/roles/domain/tasks/pkgs.yml +++ b/roles/domain/tasks/pkgs.yml @@ -5,7 +5,6 @@ apt: pkg: '{{ item }}' state: present - become: yes with_items: - winbind - samba diff --git a/roles/domain/tasks/policykit-1.yml b/roles/domain/tasks/policykit-1.yml index ef51f58..a68baa0 100644 --- a/roles/domain/tasks/policykit-1.yml +++ b/roles/domain/tasks/policykit-1.yml @@ -8,4 +8,3 @@ group: root mode: 0644 backup: yes - become: yes diff --git a/roles/domain/tasks/smb_config.yml b/roles/domain/tasks/smb_config.yml index 56b2b17..a26caff 100644 --- a/roles/domain/tasks/smb_config.yml +++ b/roles/domain/tasks/smb_config.yml @@ -17,12 +17,10 @@ - name: SAMBA restart shell: restart smbd - become: yes when: cfg_samba|changed - name: Winbind restart shell: restart winbind - become: yes when: cfg_samba|changed - name: Creating home base diff --git a/roles/domain/tasks/sslproxy.yml b/roles/domain/tasks/sslproxy.yml index a8014c8..7cb6372 100644 --- a/roles/domain/tasks/sslproxy.yml +++ b/roles/domain/tasks/sslproxy.yml @@ -19,7 +19,6 @@ - name: Adding certificates to the ones used by the system shell: update-ca-certificates when: proxycrt_dwnl|changed - become: yes - name: Firefox settings to include certificate get_url: diff --git a/roles/networkpackagemanager/tasks/main.yml b/roles/networkpackagemanager/tasks/main.yml index 7619293..1316a33 100644 --- a/roles/networkpackagemanager/tasks/main.yml +++ b/roles/networkpackagemanager/tasks/main.yml @@ -9,7 +9,6 @@ apt: name: '{{ item }}' state: present - become: yes with_items: "{{ ansible_local.noderole.addpkg }}" when: ansible_local.noderole.addpkg is defined and ansible_local.noderole.addpkg|join(' ')|trim != '' @@ -23,4 +22,3 @@ - name: Updating local hash for packages shell: 'rm -f {{ ansible_local.checksum.pkgver_file }} && echo "{{ ansible_local.checksum.pkgver }}" > {{ ansible_local.checksum.pkgver_file }}' - become: yes diff --git a/roles/vagrantbox/tasks/vagrantbox.yml b/roles/vagrantbox/tasks/vagrantbox.yml index 30b4ca7..557c103 100644 --- a/roles/vagrantbox/tasks/vagrantbox.yml +++ b/roles/vagrantbox/tasks/vagrantbox.yml @@ -9,7 +9,6 @@ shell: /bin/bash state: present generate_ssh_key: yes - become: yes - name: Concessione diritti sudo all'utente vagrant lineinfile: @@ -22,19 +21,16 @@ create: yes state: present validate: '/usr/sbin/visudo -cf %s' - become: yes - name: Autorizzo chiave pubblica insicura per vagrant authorized_key: user: vagrant key: "http://sys42.eu/downloads/vagrant.pub" - become: yes - name: Autorizzo chiave pubblica di amgmt del server authorized_key: user: vagrant key: "{{ 'http://' + ansible_local.domain.serverfqdn + ':3000/mgmtkey' }}" - become: yes - name: Utilizzo il task di cleanup della box, prima di spegnere shell: curl -s http://sys42.eu/downloads/box-cleanup.sh | sudo bash