From 4bbea4129c131f6f0dbefb08a80a2be131c423a5 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 18 Jan 2018 22:53:43 -0500 Subject: [PATCH] Update templates to using local-*.yaml This change should allow us to keep the template files relatively the same while allowing consumers of builder and docker to have some local modifications in their own ciman repos. Change-Id: I43351ea259af5bb55be8895f8cac97d5e90b923b Signed-off-by: Thanh Ha --- README.markdown | 4 ++-- provision/local-builder.yaml | 2 ++ provision/local-docker.yaml | 2 ++ templates/builder.json.example | 2 +- templates/docker.json.example | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 provision/local-builder.yaml create mode 100644 provision/local-docker.yaml diff --git a/README.markdown b/README.markdown index aa4e0cc..1237696 100644 --- a/README.markdown +++ b/README.markdown @@ -69,8 +69,8 @@ most cases this is 'provision/$SCRIPT' which is will now be To use any of the provided templates, the template should have a symlink into the calling project's templates directory. This is because our common-packer job scripts operate on the templates available in this directory. Any template, -except the 'builder', will also look for local customization out of the local -repository's provisioning with both a directory as well as script exec. +will also look for local customization out of the local repository's +provisioning directory via local-$TEMPLATE.yaml playbook. Distro specific vars are now provided in 'common-packer/vars/$DISTRO'. Path to them as normal and they will already contain the correct strings. For diff --git a/provision/local-builder.yaml b/provision/local-builder.yaml new file mode 100644 index 0000000..ddfe3a9 --- /dev/null +++ b/provision/local-builder.yaml @@ -0,0 +1,2 @@ +--- +- import_playbook: ../common-packer/provision/baseline.yaml diff --git a/provision/local-docker.yaml b/provision/local-docker.yaml new file mode 100644 index 0000000..b7518c2 --- /dev/null +++ b/provision/local-docker.yaml @@ -0,0 +1,2 @@ +--- +- import_playbook: ../common-packer/provision/docker.yaml diff --git a/templates/builder.json.example b/templates/builder.json.example index c0c194d..4b1c949 100644 --- a/templates/builder.json.example +++ b/templates/builder.json.example @@ -46,7 +46,7 @@ }, { "type": "ansible", - "playbook_file": "common-packer/provision/baseline.yaml", + "playbook_file": "provision/local-builder.yaml", "ansible_env_vars": [ "ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", diff --git a/templates/docker.json.example b/templates/docker.json.example index 6e92844..94f11ef 100644 --- a/templates/docker.json.example +++ b/templates/docker.json.example @@ -46,7 +46,7 @@ }, { "type": "ansible", - "playbook_file": "common-packer/provision/docker.yaml", + "playbook_file": "provision/local-docker.yaml", "ansible_env_vars": [ "ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", -- 2.16.6