diff options
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | files/custom_files/.gitkeep | 0 | ||||
-rw-r--r-- | qemu.yml | 1 | ||||
-rw-r--r-- | roles/copy-custom-files/tasks/main.yml | 7 | ||||
-rw-r--r-- | roles/copy-custom-files/tests/inventory | 2 | ||||
-rw-r--r-- | roles/copy-custom-files/tests/test.yml | 4 |
6 files changed, 20 insertions, 0 deletions
@@ -144,6 +144,12 @@ You need to copy the ISO image with VyOS to /tmp/vyos.iso before running ansible -e custom_packages=true ``` +- Copy custom files. All files from inside the `files/custom_files/` directory will be copied to the target filesystem recursively: + + ``` + -e custom_files=true + ``` + - Enable DHCP on eth0 (default: `false`): ``` diff --git a/files/custom_files/.gitkeep b/files/custom_files/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/files/custom_files/.gitkeep @@ -29,6 +29,7 @@ - install-cloud-init-wrapper - install-guest-agent-wrapper - install-custom-packages-wrapper + - copy-custom-files - fstrim - unmount-pre - create-pxe-archive diff --git a/roles/copy-custom-files/tasks/main.yml b/roles/copy-custom-files/tasks/main.yml new file mode 100644 index 0000000..11e12c0 --- /dev/null +++ b/roles/copy-custom-files/tasks/main.yml @@ -0,0 +1,7 @@ +- name: Copy custom files to the system, preserving paths + become: true + copy: + src: "files/custom_files/" + dest: "{{ vyos_install_root }}" + force: true + when: custom_files is defined diff --git a/roles/copy-custom-files/tests/inventory b/roles/copy-custom-files/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/copy-custom-files/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/copy-custom-files/tests/test.yml b/roles/copy-custom-files/tests/test.yml new file mode 100644 index 0000000..2163c5d --- /dev/null +++ b/roles/copy-custom-files/tests/test.yml @@ -0,0 +1,4 @@ +--- +- hosts: localhost + roles: + - copy-custom-files |