Add trailing slash to copy files

Without the trailing slash the sync task will create a nested directory
for the target when is a directory. This change ensures we're copying
copying the directories correctly.

This behaviour has been documented in the defaults file.

Change-Id: I6965e132674238727d69606464f2140ec42d6434
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-05-19 13:39:26 -05:00 committed by Kevin Carter (cloudnull)
parent d520e80462
commit eececf267f
3 changed files with 10 additions and 2 deletions

View File

@ -110,6 +110,10 @@ nspawn_cache_map: "{{ _nspawn_cache_map | default({}) }}"
# default cache is created. This list is merged to create the list of files
# to copy into the container base image which is captured under the
# `nspawn_copy_from_host` option.
# NOTICE: With all of the copy options it should be noted that it's using rsync
# within the task. If the target being copied is a "directory" the path
# should end with a tailing slash.
nspawn_default_copy_from_host:
- /etc/default/locale
- /etc/environment

View File

@ -58,4 +58,6 @@ _nspawn_cache_map:
release: xenial
_nspawn_copy_from_host:
- /etc/apt
- /etc/apt/sources.list
- /etc/apt/apt.conf.d/
- /etc/apt/preferences.d/

View File

@ -58,4 +58,6 @@ _nspawn_cache_map:
release: bionic
_nspawn_copy_from_host:
- /etc/apt
- /etc/apt/sources.list
- /etc/apt/apt.conf.d/
- /etc/apt/preferences.d/