Premature optimisation: prevent checksum during stat unless required

This commit is contained in:
Mark Goddard 2017-04-24 16:00:20 +01:00
parent cb403208be
commit 6785e6f9e4
7 changed files with 21 additions and 0 deletions

View File

@ -15,6 +15,9 @@
- name: Check whether a Kolla extra globals configuration file exists
stat:
path: "{{ kayobe_config_path ~ '/kolla/globals.yml' }}"
get_checksum: False
get_md5: False
mime: False
register: globals_stat
- name: Read the Kolla extra globals configuration file

View File

@ -18,6 +18,9 @@
- name: Check whether a Kolla Bifrost extra globals configuration file exists
stat:
path: "{{ kolla_bifrost_extra_globals_path }}"
get_checksum: False
get_md5: False
mime: False
register: globals_stat
- name: Read the Kolla Bifrost extra globals configuration file

View File

@ -9,6 +9,9 @@
- name: Check whether Kolla extra configuration files exist
stat:
path: "{{ kayobe_config_path }}/kolla/config/{{ item.file }}"
get_checksum: False
get_md5: False
mime: False
register: stat_result
with_items:
- { name: glance, file: glance.conf }

View File

@ -11,6 +11,9 @@
- name: Check whether an SSH key exists
stat:
path: "{{ bootstrap_ssh_private_key_path }}"
get_checksum: False
get_md5: False
mime: False
register: ssh_key_stat
- name: Generate an SSH key

View File

@ -25,6 +25,9 @@
- name: Check whether the Kolla passwords file exists
stat:
path: "{{ kolla_config_path }}/passwords.yml"
get_checksum: False
get_md5: False
mime: False
register: kolla_passwords_stat
- name: Generate Kolla passwords

View File

@ -80,6 +80,9 @@
- name: Check the size of the configdrive image
stat:
path: "{{ seed_vm_configdrive_path }}"
get_checksum: False
get_md5: False
mime: False
register: stat_result
roles:

View File

@ -36,6 +36,9 @@
- name: Check whether an SSH key exists on the controller
stat:
path: "{{ test_ssh_private_key_path }}"
get_checksum: False
get_md5: False
mime: False
register: ssh_key_stat
- name: Generate an SSH key on the controller