From: Patrick Hetu Date: Wed, 20 Aug 2014 17:18:01 +0000 (-0400) Subject: Merge branch 'master' of git.auf:ansible X-Git-Url: http://git.auf.org/?p=ansible.git;a=commitdiff_plain;h=d55404a157eb02bab6ca5a1a8fd84a7d2c1fe1aa;hp=ea65dcfac6353346a018b0aebfc2062f1dbd0fe0 Merge branch 'master' of git.auf:ansible --- diff --git a/paris/clients/change-line.yml b/paris/clients/change-line.yml new file mode 100644 index 0000000..19ea394 --- /dev/null +++ b/paris/clients/change-line.yml @@ -0,0 +1,4 @@ +- hosts: [TEST] + user: root + roles: + - change-line diff --git a/paris/clients/hosts b/paris/clients/hosts index 5399c0f..227a4e4 100644 --- a/paris/clients/hosts +++ b/paris/clients/hosts @@ -11,9 +11,21 @@ andj.bureautique.fr.auf clco.bureautique.fr.auf chde.bureautique.fr.auf akna.bureautique.fr.auf +anle.bureautique.fr.auf +vahe.bureautique.fr.auf +chle.bureautique.fr.auf +#auta.bureautique.fr.auf +#crpo.bureautique.fr.auf +#nefe.bureautique.fr.auf +#thbo.bureautique.fr.auf +#cabe.bureautique.fr.auf +#saro.bureautique.fr.auf +#drdr.bureautique.fr.auf +#aimo.bureautique.fr.auf + +[PORTABLE] #ffo.bureautique.fr.auf -#ale.bureautique.fr.auf [LUNDI] 192.168.0.104 @@ -21,4 +33,5 @@ akna.bureautique.fr.auf 10.72.11.240 10.72.11.219 - +[TEST] +10.72.11.223 diff --git a/paris/clients/init-desktop-precise.yml b/paris/clients/init-desktop-precise.yml new file mode 100644 index 0000000..0667130 --- /dev/null +++ b/paris/clients/init-desktop-precise.yml @@ -0,0 +1,4 @@ +- hosts: + user: root + roles: + - wake-on-lan diff --git a/paris/clients/miseajour.yml b/paris/clients/miseajour.yml index 847411f..b3baa71 100644 --- a/paris/clients/miseajour.yml +++ b/paris/clients/miseajour.yml @@ -9,7 +9,7 @@ ## Passe la mise à jour sur les ordinateurs reveillés et sur lequels aucun utilisateur est connecté #05 23 * * 1-5 root ansible-playbook /home.local/administrateur/.ansible/miseajour.yml -- hosts: WAKEONLAN +- hosts: WAKEONLAN user: root vars: diff --git a/paris/clients/roles/change-line/tasks/main.yml b/paris/clients/roles/change-line/tasks/main.yml new file mode 100644 index 0000000..0b84b68 --- /dev/null +++ b/paris/clients/roles/change-line/tasks/main.yml @@ -0,0 +1,2 @@ +- name: changement umask + lineinfile: dest=~/.test regexp=^#umask line="umask 0022" diff --git a/paris/clients/roles/desktop-precise/files/idmapd.conf b/paris/clients/roles/desktop-precise/files/idmapd.conf new file mode 100644 index 0000000..5197bee --- /dev/null +++ b/paris/clients/roles/desktop-precise/files/idmapd.conf @@ -0,0 +1,11 @@ +[General] + +Verbosity = 0 +Pipefs-Directory = /run/rpc_pipefs +# set your own domain here, if id differs from FQDN minus hostname +Domain = localdomain + +[Mapping] + +Nobody-User = nobody +Nobody-Group = nogroup diff --git a/paris/clients/roles/desktop-precise/files/libnss-mysql-root.cfg b/paris/clients/roles/desktop-precise/files/libnss-mysql-root.cfg new file mode 100644 index 0000000..e161491 --- /dev/null +++ b/paris/clients/roles/desktop-precise/files/libnss-mysql-root.cfg @@ -0,0 +1,2 @@ +username nss-root +password olerabin diff --git a/paris/clients/roles/desktop-precise/files/libnss-mysql.cfg b/paris/clients/roles/desktop-precise/files/libnss-mysql.cfg new file mode 100644 index 0000000..caab29e --- /dev/null +++ b/paris/clients/roles/desktop-precise/files/libnss-mysql.cfg @@ -0,0 +1,40 @@ +getpwnam SELECT username,'x',uid,gid,gecos,homedir,shell \ + FROM users \ + WHERE username= binary '%1$s' \ + LIMIT 1 +getpwuid SELECT username,'x',uid,gid,gecos,homedir,shell \ + FROM users \ + WHERE uid='%1$u' \ + LIMIT 1 +getspnam SELECT username,password,lstchg,min,max,warn,inact,expire,flag \ + FROM users \ + WHERE username= binary '%1$s' \ + LIMIT 1 +getpwent SELECT username,'x',uid,gid,gecos,homedir,shell \ + FROM users +getspent SELECT username,password,lstchg,min,max,warn,inact,expire,flag \ + FROM users +getgrnam SELECT name,password,gid \ + FROM groups \ + WHERE name='%1$s' \ + LIMIT 1 +getgrgid SELECT name,password,gid \ + FROM groups \ + WHERE gid='%1$u' \ + LIMIT 1 +getgrent SELECT name,password,gid \ + FROM groups +memsbygid SELECT username \ + FROM grouplist \ + WHERE gid='%1$u' +gidsbymem SELECT gid \ + FROM grouplist \ + WHERE username= binary '%1$s' + +host nss.bureautique.fr.auf +database auth +username nss-user +password tahiti2005 +timeout 3 +compress 0 + diff --git a/paris/clients/roles/desktop-precise/handlers/main.yml b/paris/clients/roles/desktop-precise/handlers/main.yml new file mode 100644 index 0000000..0afcc01 --- /dev/null +++ b/paris/clients/roles/desktop-precise/handlers/main.yml @@ -0,0 +1,5 @@ +- name: restart nscd + service: name=nscd state=restarted + +- name: reboot system + command: /sbin/reboot diff --git a/paris/clients/roles/desktop-precise/tasks/main.yml b/paris/clients/roles/desktop-precise/tasks/main.yml new file mode 100644 index 0000000..3cc4693 --- /dev/null +++ b/paris/clients/roles/desktop-precise/tasks/main.yml @@ -0,0 +1,40 @@ +- name: creation utilisateur visiteur + user: name=visiteur password='$6$061hiwJi$KhW6jTtBQUfZxzNWcgqRVA4dLHv9lda94czcHiSqCKhbdMXqXB/W2Im7Jg8TKOEuDuFotIr4ZLYQiD8EY8tZo.' shell='/bin/bash' + +- name: check home.local + command: /bin/mv /home /home.local creates=/home.local + +- name: change home dir local user + replace: dest=/etc/passwd regexp='/home/' replace='/home.local/' + +- name: check ln home nfs + command: /bin/ln -s /net/nfs/home /home creates=/home + +- name: check libnss-mysql-root + copy: src=libnss-mysql-root.cfg dest=/etc/libnss-mysql-root.cfg owner=root group=root mode=0600 + +- name: check libnss-mysql + copy: src=libnss-mysql.cfg dest=/etc/libnss-mysql.cfg owner=root group=root mode=0644 + +- name: restart nscd + service: name=nscd state=restarted + +- name: check getent passwd nagios + command: /usr/bin/getent passwd nagios + +- name: check getent group bur + command: /usr/bin/getent group bur + +- name: cacher les logins + command: /usr/lib/lightdm/lightdm-set-defaults -i true +# notify: reboot system + +- name: check idmapd + copy: src=idmapd.conf dest=/etc/idmapd.conf owner=root group=root mode=0644 + +- name: imprimante PDF + command: /usr/sbin/dpkg-reconfigure cups-pdf + +- name: changement umask + lineinfile: dest=~/.profile regexp=^#umask line="umask 0022" + diff --git a/paris/clients/roles/mise-a-jour/tasks/main.yml b/paris/clients/roles/mise-a-jour/tasks/main.yml index 8f2ab9c..8aa79c5 100644 --- a/paris/clients/roles/mise-a-jour/tasks/main.yml +++ b/paris/clients/roles/mise-a-jour/tasks/main.yml @@ -5,14 +5,22 @@ - name: temps allumage machine shell: "cat /proc/uptime | awk '{print $1}'" register: vtime + +- name: ajout key owncloud + apt_key: url=http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_12.04/Release.key state=present + when: vuser.stdout|int == 1 -- name: mise a jour update upgrade +- name: mise a jour update && upgrade shell: "aptitude update && apt-get upgrade -y --force-yes" when: vuser.stdout|int == 1 -- name: mise a jour update upgrade deuxime passage +- name: mise a jour update upgrade deuxieme passage apt: update_cache=yes upgrade=dist when: vuser.stdout|int == 1 + +- name: Ajout de umask 022 dans /etc/profile + lineinfile: dest=/etc/profile regexp=^umask line='umask 0022' + when: vuser.stdout|int == 1 - name: extinction ordinateur shell: "poweroff" diff --git a/paris/clients/roles/sync_mail/files/local-settings.js b/paris/clients/roles/sync_mail/files/local-settings.js new file mode 100644 index 0000000..3476281 --- /dev/null +++ b/paris/clients/roles/sync_mail/files/local-settings.js @@ -0,0 +1,2 @@ +//pref("general.config.obscure_value", 0); +pref("general.config.filename", "mozilla.cfg"); diff --git a/paris/clients/roles/sync_mail/files/mozilla.cfg b/paris/clients/roles/sync_mail/files/mozilla.cfg new file mode 100644 index 0000000..abcb20b --- /dev/null +++ b/paris/clients/roles/sync_mail/files/mozilla.cfg @@ -0,0 +1,4 @@ +// +lockPref("mail.server.default.autosync_offline_stores", false); +lockPref("mail.server.default.offline_download", false); +lockPref("mail.server.server1.offline_download", false); diff --git a/paris/clients/roles/sync_mail/tasks/main.yml b/paris/clients/roles/sync_mail/tasks/main.yml new file mode 100644 index 0000000..a9af4e6 --- /dev/null +++ b/paris/clients/roles/sync_mail/tasks/main.yml @@ -0,0 +1,5 @@ +- name: copie verrouillage preference thunderbird + copy: src=mozilla.cfg dest=/usr/lib/thunderbird/mozilla.cfg owner=root group=root mode=0644 + +- name: copie fichier config thunderbird + copy: src=local-settings.js dest=/usr/lib/thunderbird/defaults/pref/local-settings.js owner=root group=root mode=0644 diff --git a/paris/clients/roles/wake-on-lan/vars/main.yml b/paris/clients/roles/wake-on-lan/vars/main.yml index 9335c8e..dacecd8 100644 --- a/paris/clients/roles/wake-on-lan/vars/main.yml +++ b/paris/clients/roles/wake-on-lan/vars/main.yml @@ -18,16 +18,16 @@ mardi: # Angeline : 00018081CF33 # Patricia : 00018081CEE7 mercredi: - - [ '00:01:80:81:CE:F2', '00:01:80:81:ce:e8', '00:01:80:81:cf:33', '00:01:80:81:ce:e7' ] + - [ '00:01:80:81:CE:F2', '00:01:80:81:ce:e8', '00:01:80:81:cf:33' ] # Arnaud : 00018081:CF:41 # Fabienne : 00018081:C3:C6 # Nelly : -# Vannessa +# Vannessa : 00:01:80:81:cf:40 jeudi: - - [ '00:01:80:81:cf:41', '00:01:80:81:c3:c6' ] + - [ '00:01:80:81:cf:41', '00:01:80:81:c3:c6', '00:01:80:81:cf:40' ] # Sandrine -# Chantal L +# Chantal L : 00:01:80:81:ce:e2 vendredi: - - [ '00:01:80:81:ce:f2', '00:01:80:81:cf:9d', '00:01:80:81:ce:e8' ] + - [ '00:01:80:81:ce:f2', '00:01:80:81:cf:9d', '00:01:80:81:ce:e8', '00:01:80:81:ce:e2' ] diff --git a/paris/clients/sync_mail.yml b/paris/clients/sync_mail.yml new file mode 100644 index 0000000..41b3315 --- /dev/null +++ b/paris/clients/sync_mail.yml @@ -0,0 +1,4 @@ +- hosts: [TEST] + user: root + roles: + - sync_mail