Trying to remove become access. Ansible-pull has to be run by root, so no sudo required, in theory.

This commit is contained in:
Emiliano Vavassori 2016-02-19 20:55:16 +01:00
parent 76c8dbd8b3
commit ae00635194
24 changed files with 0 additions and 48 deletions

View File

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

View File

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

View File

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

View File

@ -5,9 +5,7 @@
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

@ -2,6 +2,5 @@
- name: reboot
shell: shutdown -r now "Reboot by Ansible."
become: yes
async: 0
poll: 0

View File

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

View File

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

View File

@ -4,7 +4,6 @@
apt:
name: "{{ item }}"
state: present
become: yes
with_items:
- unattended-upgrades
- update-notifier-common

View File

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

View File

@ -2,6 +2,5 @@
- name: reboot
shell: shutdown -r now "Reboot by Ansible."
become: yes
async: 0
poll: 0

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

@ -5,7 +5,6 @@
apt:
pkg: '{{ item }}'
state: present
become: yes
with_items:
- winbind
- samba

View File

@ -8,4 +8,3 @@
group: root
mode: 0644
backup: yes
become: yes

View File

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

View File

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

View File

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

View File

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