From 4b627c6e750b96512b0f1ea38f014a7c4711b811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Paulon?= Date: Sun, 17 May 2020 03:58:20 +0200 Subject: [PATCH] =?UTF-8?q?on=20met=20des=20templates=20corrects=20pour=20?= =?UTF-8?q?chsh=20(et=20chsh.ldap=20sert=20=C3=A0=20rien)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/ldap-client/tasks/main.yml | 2 +- roles/ldap-client/templates/bin/chsh.j2 | 4 ++++ roles/ldap-client/templates/bin/chsh.ldap.j2 | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 roles/ldap-client/templates/bin/chsh.j2 create mode 100644 roles/ldap-client/templates/bin/chsh.ldap.j2 diff --git a/roles/ldap-client/tasks/main.yml b/roles/ldap-client/tasks/main.yml index 3912f981..8195e6f1 100644 --- a/roles/ldap-client/tasks/main.yml +++ b/roles/ldap-client/tasks/main.yml @@ -36,7 +36,7 @@ # Disable passwd and chsh - name: Copy passwd and chsh scripts template: - src: bin/passwd.j2 + src: "bin/{{ item }}.j2" dest: "/usr/local/bin/{{ item }}" mode: 0755 loop: diff --git a/roles/ldap-client/templates/bin/chsh.j2 b/roles/ldap-client/templates/bin/chsh.j2 new file mode 100644 index 00000000..37462f78 --- /dev/null +++ b/roles/ldap-client/templates/bin/chsh.j2 @@ -0,0 +1,4 @@ +#!/bin/sh +{{ ansible_header | comment }} +echo "Pour changer votre shell,\nAllez sur l'intranet : {{intranet_url}}" + diff --git a/roles/ldap-client/templates/bin/chsh.ldap.j2 b/roles/ldap-client/templates/bin/chsh.ldap.j2 new file mode 100644 index 00000000..175fdfc1 --- /dev/null +++ b/roles/ldap-client/templates/bin/chsh.ldap.j2 @@ -0,0 +1,4 @@ +#!/bin/sh +{{ ansible_header | comment }} +echo "Pour changer votre shell,\nAllez sur l'intranet : {{intranet_url}}" +echo "De toutes façons la vraie commande aurait pas marché, on installe pas nslcd-utils sur les serveurs normalement."