From c4196838543221e82d6e56924f139624ec1be693 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Fri, 5 Feb 2016 12:43:07 -0600 Subject: [PATCH] Fail early if missing root password If a deployer forgets to set a user secret for the galera_root_password variable, the deployment will make it halfway through the galera installation and fail. This patch causes the galera role to fail very early, which allows deployers to set the variable before partially deploying galera nodes. Change-Id: If0863915e6856496bded410452959e4c2ea5155d Closes-bug: 1542440 --- tasks/galera_install.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/galera_install.yml b/tasks/galera_install.yml index 71dce4c2..a32415b5 100644 --- a/tasks/galera_install.yml +++ b/tasks/galera_install.yml @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Fail if the galera root password is not provided + fail: + msg: | + Please set the galera_root_password variable prior to applying the + galera role. + when: (galera_root_password is undefined) or (galera_root_password is none) + - name: Preseed galera password(s) debconf: name: "{{ item.name }}"