From a0813e951c5b91dc538803e9003f788d9ae80558 Mon Sep 17 00:00:00 2001 From: nicoo Date: Mon, 26 Nov 2018 23:30:58 +0100 Subject: [PATCH] base: Refactor deployment of default config files --- ansible/roles/base/tasks/main.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml index c155be4..e7e808e 100644 --- a/ansible/roles/base/tasks/main.yml +++ b/ansible/roles/base/tasks/main.yml @@ -148,19 +148,6 @@ when: ansible_distribution == "Ubuntu" -- name: install zshrc - with_items: - - src: "zprofile" - dest: "/etc/zsh/zprofile" - - src: "zshrc" - dest: "/etc/zsh/zshrc" - - src: "zshrc.skel" - dest: "/etc/skel/.zshrc" - copy: - src: "{{ item.src }}" - dest: "{{ item.dest }}" - mode: 0644 - - name: set root default shell to zsh user: name: root @@ -173,3 +160,16 @@ dest: /etc/adduser.conf regexp: "^#?{{ item.key }}=" line: "{{ item.key }}={{ item.value }}" + +- name: Deploy default configuration for tools + with_dict: + /etc/zsh/zprofile: zprofile + /etc/zsh/zshrc: zshrc + /etc/skel/.zshrc: zshrc.skel + + loop_control: + label: "{{ item.key }}" + copy: + mode: 0644 + src: "{{ item.value }}" + dest: "{{ item.key }}" -- 1.7.10.4