From 6785e6f9e47dbc733cb7192b9ca8d8ab21f62054 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 24 Apr 2017 16:00:20 +0100 Subject: [PATCH] Premature optimisation: prevent checksum during stat unless required --- ansible/kolla-ansible.yml | 3 +++ ansible/kolla-bifrost.yml | 3 +++ ansible/kolla-openstack.yml | 3 +++ ansible/roles/bootstrap/tasks/main.yml | 3 +++ ansible/roles/kolla-ansible/tasks/config.yml | 3 +++ ansible/seed-vm.yml | 3 +++ ansible/test-project.yml | 3 +++ 7 files changed, 21 insertions(+) diff --git a/ansible/kolla-ansible.yml b/ansible/kolla-ansible.yml index d77de0ddb..be62f6428 100644 --- a/ansible/kolla-ansible.yml +++ b/ansible/kolla-ansible.yml @@ -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 diff --git a/ansible/kolla-bifrost.yml b/ansible/kolla-bifrost.yml index 4b7644fd0..fcda9d7f9 100644 --- a/ansible/kolla-bifrost.yml +++ b/ansible/kolla-bifrost.yml @@ -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 diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index e8f1352b0..2f5683fee 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -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 } diff --git a/ansible/roles/bootstrap/tasks/main.yml b/ansible/roles/bootstrap/tasks/main.yml index df20e8c2f..456b3e535 100644 --- a/ansible/roles/bootstrap/tasks/main.yml +++ b/ansible/roles/bootstrap/tasks/main.yml @@ -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 diff --git a/ansible/roles/kolla-ansible/tasks/config.yml b/ansible/roles/kolla-ansible/tasks/config.yml index 1223061aa..d7d9c42ed 100644 --- a/ansible/roles/kolla-ansible/tasks/config.yml +++ b/ansible/roles/kolla-ansible/tasks/config.yml @@ -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 diff --git a/ansible/seed-vm.yml b/ansible/seed-vm.yml index b070a2e4e..05d1eb350 100644 --- a/ansible/seed-vm.yml +++ b/ansible/seed-vm.yml @@ -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: diff --git a/ansible/test-project.yml b/ansible/test-project.yml index 66c63086b..c93f23334 100644 --- a/ansible/test-project.yml +++ b/ansible/test-project.yml @@ -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