Cleaning up become where not required.

This commit is contained in:
Emiliano Vavassori 2016-02-20 22:01:53 +01:00
parent 085812ed1d
commit df513da785
15 changed files with 3 additions and 27 deletions

View File

@ -2,4 +2,4 @@
inventory=hosts
log_path=/var/log/ansible.log
host_key_checking=False
become_method=su
become_method=sudo

View File

@ -4,7 +4,6 @@
apt:
name: ansible
state: present
become: yes
- name: Updating ansible-pull custom scripts
get_url:

View File

@ -18,4 +18,3 @@
- name: Updating package database
apt: update_cache=yes
become: yes

View File

@ -11,7 +11,6 @@
- name: Installation of the desktop environment
shell: "DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -y install edubuntu-desktop-gnome^"
when: check_edubuntu_pkg|changed
become: yes
tags: edu-install
- name: Change default desktop environment

View File

@ -7,7 +7,6 @@
state: absent
purge: yes
with_items: "{{ base_common_delpkg }}"
become: yes
- name: Removing packages from client machines
apt:
@ -16,7 +15,6 @@
purge: yes
with_items: "{{ base_client_delpkg }}"
when: ansible_local.noderole.role == 'client' and base_client_delpkg|length > 0
become: yes
- name: Removing packages from docenti machines
apt:
@ -25,13 +23,11 @@
purge: yes
with_items: "{{ base_docenti_delpkg }}"
when: ansible_local.noderole.role == 'docenti' and base_docenti_delpkg|length > 0
become: yes
- 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,7 +35,6 @@
state: installed
with_items: "{{ base_common_addpkg }}"
tags: edu-install
become: yes
- name: Installing additional packages for client role
apt:
@ -47,7 +42,6 @@
state: present
with_items: "{{ base_client_addpkg }}"
when: ansible_local.noderole.role == 'client' and base_client_addpkg|length > 0
become: yes
- name: Installing additional packages for docenti role
apt:
@ -55,7 +49,6 @@
state: present
with_items: "{{ base_docenti_addpkg }}"
when: ansible_local.noderole.role == 'docenti' and base_docenti_addpkg|length > 0
become: yes
- name: Correggo NetworkManager per gestire la rete
lineinfile:

View File

@ -3,8 +3,6 @@
- name: Updating available packages
apt: update_cache=yes cache_valid_time=180
become: yes
- name: Upgrading system
apt: upgrade=full
become: yes

View File

@ -6,4 +6,3 @@
pkg: virtualbox-guest-dkms
stat: present
when: ansible_product_name == "VirtualBox"
become: yes

View File

@ -3,13 +3,11 @@
- name: Installing plymouth theme
apt:
name: plymouth-theme-edubuntu-bglug
state: present
state: latest
force: yes
become: yes
- name: Installing lightdm wallpaper
apt:
name: bglug-artwork
state: present
state: latest
force: yes
become: yes

View File

@ -7,7 +7,6 @@
with_items:
- unattended-upgrades
- update-notifier-common
become: yes
- name: Configuring unattended upgrades from file
copy:

View File

@ -5,7 +5,6 @@
apt:
name: ntp
state: present
become: yes
- name: Configuring NTP
template:

View File

@ -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.

View File

@ -5,7 +5,6 @@
apt:
name: libpam-mount
state: present
become: yes
- name: Configuring pam_mount
template:

View File

@ -8,4 +8,3 @@
with_items:
- winbind
- samba
become: yes

View File

@ -4,7 +4,6 @@
- name: Updating package cache.
apt: update_cache=yes cache_valid_time=180
become: yes
- name: Debug
debug: var=ansible_local.noderole.addpkg
@ -15,7 +14,6 @@
state: present
with_items: "{{ ansible_local.noderole.addpkg }}"
when: ansible_local.noderole.addpkg is defined and ansible_local.noderole.addpkg|join(' ')|trim != ''
become: yes
- name: Removing packages for specific role from NetworkPackageManager
apt:
@ -24,7 +22,6 @@
purge: yes
with_items: "{{ ansible_local.noderole.delpkg }}"
when: ansible_local.noderole.delpkg is defined and ansible_local.noderole.delpkg|join(' ')|trim != ''
become: yes
- name: Updating local hash for packages
shell: 'rm -f {{ ansible_local.checksum.pkgver_file }} && echo "{{ ansible_local.checksum.pkgver }}" > {{ ansible_local.checksum.pkgver_file }}'

View File

@ -20,7 +20,6 @@
apt:
name: python-yaml
state: present
become: yes
- name: Creating facts.d script for the domain settings
copy: