From: Thanh Ha Date: Fri, 19 Jan 2018 03:53:43 +0000 (-0500) Subject: Update templates to using local-*.yaml X-Git-Tag: v0.1.0~47^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=4bbea4129c131f6f0dbefb08a80a2be131c423a5;p=releng%2Fcommon-packer.git 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 --- 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",