Federico Ressi 9108be7e83 Avoid re-stacking when not necessary
Also adds a swap file of 8GB

Change-Id: I50b7dcb5ca40c9840ae086006c9d868637d3b5d0
2020-10-02 15:39:53 +02:00

39 lines
969 B
YAML

---
- when: not (force_restack | bool)
block:
- name: check file '{{ stack_succeeded_file }}' exists
stat:
path: '{{ stack_succeeded_file }}'
register: check_devstack_succeeded_file_exists
failed_when: no
- debug: var=check_devstack_succeeded_file_exists
- set_fact:
force_restack: >-
{{ not check_devstack_succeeded_file_exists.stat.exists |
default(true) |
bool }}
- debug: var=force_restack
- when: force_restack | bool
block:
- name: check file '{{ devstack_dir }}/local.conf' exists
stat:
path: '{{ devstack_dir }}/local.conf'
register: check_devstack_local_conf_file_exists
failed_when: no
- debug: var=check_devstack_local_conf_file_exists
- set_fact:
force_restack: >-
{{ check_devstack_local_conf_file_exists.stat.exists |
default(false) |
bool }}
- debug: var=force_restack