From 593db8a7774abff54cdfa0dec8d8cca320b6cdf7 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Sat, 3 Feb 2018 19:49:05 +0000 Subject: [PATCH] Allow missing ironic policy.json sample Since ironic change I10a4987204eb335f1fed29d4b1d7f3e075aa1792, the sample policy.json is not present in the ironic repository. Since policy is now in code, it is not required. This change only copies the sample file to /etc/ironic when it exists in the ironic repository. Change-Id: Iecdbd90b4c94556f5d0803e4340dfd6b473792c7 --- .../roles/bifrost-ironic-install/tasks/bootstrap.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml index 8b0c3d347..5cc5fef21 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml @@ -153,6 +153,13 @@ - name: "Generate ironic Configuration" include: ironic_config.yml +# TODO(mgoddard): Remove this check and the following copy when ironic's pike release is no longer +# supported. +- name: "Check for ironic policy.json" + stat: + path: "{{ ironic_git_folder }}/etc/ironic/policy.json" + register: test_ironic_policy_json + - name: "Copy policy.json to /etc/ironic" copy: src: "{{ ironic_git_folder }}/etc/ironic/policy.json" @@ -161,6 +168,7 @@ owner: "ironic" group: "ironic" mode: 0644 + when: test_ironic_policy_json.stat.exists - name: "Create ironic DB Schema" command: ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema