From 13de5ffdedc136b33a300a654fc410d4a9aa277f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Mon, 11 Apr 2016 18:07:25 +0100 Subject: [PATCH] Fix idempotency bug in AIO bootstrap Change-Id: I88a563928112abf252354e546da9dce4819048e0 --- .../bootstrap-host/tasks/prepare_aio_config.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml index 3846810d10..37d9b22311 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml @@ -153,16 +153,26 @@ tags: - container-conf-files -- name: Ensure that the first two lines in user_conf_files are correct +- name: Ensure that the first line in user_conf_files is correct lineinfile: dest: /etc/openstack_deploy/user_conf_files.yml - line: "---\nlxc_container_cache_files:" + line: "---" insertbefore: BOF when: - apt_conf_files is defined or pip_conf_file.stat.exists tags: - container-conf-files +- name: Ensure that the second line in user_conf_files is correct + lineinfile: + dest: /etc/openstack_deploy/user_conf_files.yml + line: "lxc_container_cache_files:" + insertafter: "^---" + when: + - apt_conf_files is defined or pip_conf_file.stat.exists + tags: + - container-conf-files + - name: Add the dict to copy the global pip config file into user_conf_files lineinfile: dest: /etc/openstack_deploy/user_conf_files.yml