From c2d9e197ad37a3a6465ad8177895c52af06a80af Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 13 Jul 2015 10:18:28 +0100 Subject: [PATCH] roles/common/tasks/main.yml: Trailing `/' on copy destination directories. Ansible correctly notices this and creates the necessary directory if it doesn't exist already. Without the trailing `/', Ansible might copy the file to where we wanted the directory and then everything is weird. --- roles/common/tasks/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index bfad555..9c2f2f1 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -16,14 +16,14 @@ - name: install PKI maintenance scripts tags: [pki, pki-scripts] - copy: src=pki/{{ item }} dest=/etc/cron.daily + copy: src=pki/{{ item }} dest=/etc/cron.daily/ with_items: - update-ca-certs - check-x509-certs - name: install common PKI files tags: [pki, pki-keys] - copy: src=pki/{{ item }} dest=/etc/ca + copy: src=pki/{{ item }} dest=/etc/ca/ with_items: - ca.cert - dh-param.pem @@ -39,7 +39,7 @@ - name: install NTP client configuration files tags: [ntp, ntp-client] - copy: src=ntp-client/ntp.conf dest=/etc + copy: src=ntp-client/ntp.conf dest=/etc/ when: ('ntp') not in server |default([]) notify: restart ntpd @@ -48,7 +48,7 @@ - name: install netdb files tags: netdb - copy: src=netdb/{{ item }} dest=/etc + copy: src=netdb/{{ item }} dest=/etc/ with_items: - hosts - networks @@ -59,7 +59,7 @@ - name: install SSH configuration files tags: [ssh, ssh-config] - copy: src=ssh-config/{{ item }} dest=/etc/ssh + copy: src=ssh-config/{{ item }} dest=/etc/ssh/ notify: restart ssh with_items: - Makefile @@ -74,7 +74,7 @@ - name: install keys for root SSH access tags: [ssh, ssh-root] - copy: src=ssh-root/{{ item }} dest=/root/.ssh + copy: src=ssh-root/{{ item }} dest=/root/.ssh/ notify: make in /root/.ssh with_items: - Makefile @@ -93,7 +93,7 @@ - name: install required backup scripts on non-Debian hosts tags: [backup, backup-scripts] - copy: src=backup/fshash dest=/usr/local/bin + copy: src=backup/fshash dest=/usr/local/bin/ when: os != 'debian' ###-------------------------------------------------------------------------- @@ -101,11 +101,11 @@ - name: install sudo configuration tags: [sudo] - copy: src=sudo/sudoers dest=/etc + copy: src=sudo/sudoers dest=/etc/ - name: install common scripts tags: [scripts] - copy: src=scripts/{{ item }} dest=/usr/local/bin + copy: src=scripts/{{ item }} dest=/usr/local/bin/ with_items: - fetch-unpack-archive - genx509 -- 2.11.0