Updating roles for recent versions of Ansible.

This commit is contained in:
Emiliano Vavassori 2019-11-18 22:49:41 +01:00
parent c5dbaf38e1
commit e45c72de4d
9 changed files with 17 additions and 17 deletions

View File

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

View File

@ -10,27 +10,27 @@
- name: Checking for a correct name - name: Checking for a correct name
shell: cat /tmp/epoptes-srv shell: cat /tmp/epoptes-srv
register: epo_srv_name register: epo_srv_name
when: get_epo_srv_name|changed when: get_epo_srv_name is changed
changed_when: "'none' not in epo_srv_name.stdout" changed_when: "'none' not in epo_srv_name.stdout"
- name: Cleanup - name: Cleanup
file: file:
path: /tmp/epoptes-srv path: /tmp/epoptes-srv
state: absent state: absent
when: get_epo_srv_name|changed when: get_epo_srv_name is changed
- name: Ensuring epoptes-client is installed - name: Ensuring epoptes-client is installed
apt: apt:
name: epoptes-client name: epoptes-client
state: present state: present
when: get_epo_srv_name|changed when: get_epo_srv_name is changed
- name: Configuring the client - name: Configuring the client
replace: replace:
dest: /etc/default/epoptes-client dest: /etc/default/epoptes-client
regexp: "^#SERVER=server" regexp: "^#SERVER=server"
replace: "SERVER={{ epo_srv_name.stdout }}" replace: "SERVER={{ epo_srv_name.stdout }}"
when: epo_srv_name|changed when: epo_srv_name is changed
- name: Checking for an already existent certificate - name: Checking for an already existent certificate
file: file:
@ -41,7 +41,7 @@
- name: Getting the epoptes server certificate - name: Getting the epoptes server certificate
shell: /usr/sbin/epoptes-client -c shell: /usr/sbin/epoptes-client -c
when: crt_epo_exists|failed when: crt_epo_exists is failed
# I don't notify anymore, hoping that this would be done on first run after # I don't notify anymore, hoping that this would be done on first run after
# preseed and it should restart because of domain join. # preseed and it should restart because of domain join.
#notify: #notify:

View File

@ -9,7 +9,7 @@
- name: Joining domain - name: Joining domain
shell: 'net rpc join -U admin%{{ domainadminpasswd }}' shell: 'net rpc join -U admin%{{ domainadminpasswd }}'
when: check_domain|changed when: check_domain is changed
register: domainjoin register: domainjoin
notify: notify:
- reboot - reboot

View File

@ -24,4 +24,4 @@
- name: Recompiling glib2 schemas - name: Recompiling glib2 schemas
shell: glib-compile-schemas --strict /usr/share/glib-2.0/schemas/ shell: glib-compile-schemas --strict /usr/share/glib-2.0/schemas/
when: cfg_glib_users|changed or cfg_glib_mounted|changed or cfg_keyb_layout|changed when: cfg_glib_users is changed or cfg_glib_mounted is changed or cfg_keyb_layout is changed

View File

@ -26,4 +26,4 @@
- name: Restarting NTP service - name: Restarting NTP service
shell: service ntp restart shell: service ntp restart
when: cfg_ntp|changed when: cfg_ntp is changed

View File

@ -20,7 +20,7 @@
#- name: Downgrading SAMBA if not the right version #- name: Downgrading SAMBA if not the right version
# shell: "/var/lib/{{ ansible_local.domain.domainfull }}/bin/downgrade_samba.sh" # shell: "/var/lib/{{ ansible_local.domain.domainfull }}/bin/downgrade_samba.sh"
# when: check_samba_version|changed # when: check_samba_version is changed
# #
#- name: Checking again for the correct SAMBA version #- name: Checking again for the correct SAMBA version
# shell: dpkg -l | grep libsmbclient # shell: dpkg -l | grep libsmbclient

View File

@ -17,11 +17,11 @@
- name: SAMBA restart - name: SAMBA restart
shell: /sbin/restart smbd shell: /sbin/restart smbd
when: cfg_samba|changed when: cfg_samba is changed
- name: Winbind restart - name: Winbind restart
shell: /sbin/restart winbind shell: /sbin/restart winbind
when: cfg_samba|changed when: cfg_samba is changed
- name: Creating home base - name: Creating home base
file: file:

View File

@ -18,7 +18,7 @@
- name: Adding certificates to the ones used by the system - name: Adding certificates to the ones used by the system
shell: update-ca-certificates shell: update-ca-certificates
when: proxycrt_dwnl|changed when: proxycrt_dwnl is changed
- name: Firefox settings to include certificate - name: Firefox settings to include certificate
get_url: get_url:

View File

@ -15,7 +15,7 @@
- name: Installing libreoffice PPA GPG key - name: Installing libreoffice PPA GPG key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 1378B444 shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 1378B444
when: check_gpg_libreoffice|failed when: check_gpg_libreoffice is failed
- name: Checking for ansible PPA GPG key - name: Checking for ansible PPA GPG key
shell: apt-key list | grep -q 7BB9C367 shell: apt-key list | grep -q 7BB9C367
@ -24,7 +24,7 @@
- name: Installing ansible PPA GPG key - name: Installing ansible PPA GPG key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7BB9C367 shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 7BB9C367
when: check_gpg_ansible|failed when: check_gpg_ansible is failed
- name: Checking for epoptes PPA GPG key - name: Checking for epoptes PPA GPG key
shell: apt-key list | grep -q 0350B375 shell: apt-key list | grep -q 0350B375
@ -33,7 +33,7 @@
- name: Installing epoptes PPA GPG key - name: Installing epoptes PPA GPG key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 0350B375 shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 0350B375
when: check_gpg_epoptes|failed when: check_gpg_epoptes is failed
- name: Checking for geogebra GPG key - name: Checking for geogebra GPG key
shell: apt-key list | grep -q 83A736CF shell: apt-key list | grep -q 83A736CF
@ -42,7 +42,7 @@
- name: Installing geogebra GPG key - name: Installing geogebra GPG key
shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 83A736CF shell: apt-key adv --keyserver keyserver.ubuntu.com --recv 83A736CF
when: check_gpg_geogebra|failed when: check_gpg_geogebra is failed
- name: Removing old repositories (if present) - name: Removing old repositories (if present)
file: file: