From: nicoo Date: Wed, 13 Jun 2018 22:29:10 +0000 (+0200) Subject: base: Use with_dict for editing adduser.conf X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=c3dd750fd271fa7d3a200dfd4ccd81147eeedb08;p=noc.git base: Use with_dict for editing adduser.conf --- diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml index 92218ba..919b2aa 100644 --- a/ansible/roles/base/tasks/main.yml +++ b/ansible/roles/base/tasks/main.yml @@ -139,10 +139,9 @@ shell: /bin/zsh - name: set default shell for adduser - with_items: - - regexp: "^DSHELL" - line: "DSHELL=/bin/zsh" + with_dict: + DSHELL: /bin/zsh lineinfile: dest: /etc/adduser.conf - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" + regexp: "^#?{{ item.key }}=" + line: "{{ item.key }}={{ item.value }}"