Merge "Only update apt cache if necessary"
This commit is contained in:
@@ -13,6 +13,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
## APT Cache Options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# to user Ceph in OSA, you need to
|
# to user Ceph in OSA, you need to
|
||||||
# - have the needed pools and a client user (for glance, cinder and/or nova)
|
# - have the needed pools and a client user (for glance, cinder and/or nova)
|
||||||
# pre-provisioned in your ceph cluster; OSA assumes to have root access to
|
# pre-provisioned in your ceph cluster; OSA assumes to have root access to
|
||||||
|
|||||||
@@ -13,12 +13,27 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- ceph-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
|
tags:
|
||||||
|
- ceph-apt-packages
|
||||||
|
|
||||||
- name: Install ceph packages
|
- name: Install ceph packages
|
||||||
apt:
|
apt:
|
||||||
name: '{{ item.1 }}'
|
name: '{{ item.1 }}'
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: yes
|
|
||||||
cache_valid_time: 600
|
|
||||||
register: install_packages
|
register: install_packages
|
||||||
until: install_packages|success
|
until: install_packages|success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
# Defines that the role will be deployed on a host machine
|
# Defines that the role will be deployed on a host machine
|
||||||
is_metal: true
|
is_metal: true
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
haproxy_apt_repo_url: "http://ppa.launchpad.net/vbernat/haproxy-1.5/ubuntu"
|
haproxy_apt_repo_url: "http://ppa.launchpad.net/vbernat/haproxy-1.5/ubuntu"
|
||||||
haproxy_apt_repo:
|
haproxy_apt_repo:
|
||||||
repo: "deb {{ haproxy_apt_repo_url }} {{ ansible_distribution_release }} main"
|
repo: "deb {{ haproxy_apt_repo_url }} {{ ansible_distribution_release }} main"
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- haproxy-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- haproxy-apt-packages
|
- haproxy-apt-packages
|
||||||
|
|
||||||
@@ -87,3 +93,11 @@
|
|||||||
delay: 2
|
delay: 2
|
||||||
tags:
|
tags:
|
||||||
- haproxy-repos
|
- haproxy-repos
|
||||||
|
|
||||||
|
- name: Update apt if necessary
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
when: add_repos|changed
|
||||||
|
tags:
|
||||||
|
- haproxy-repos
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- haproxy-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- haproxy-apt-packages
|
- haproxy-apt-packages
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
debug: False
|
debug: False
|
||||||
verbose: False
|
verbose: False
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
aodh_venv_tag: untagged
|
aodh_venv_tag: untagged
|
||||||
aodh_venv_bin: "/openstack/venvs/aodh-{{ aodh_venv_tag }}/bin"
|
aodh_venv_bin: "/openstack/venvs/aodh-{{ aodh_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,12 +13,27 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- aodh-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
|
tags:
|
||||||
|
- aodh-apt-packages
|
||||||
|
|
||||||
- name: Install apt packages
|
- name: Install apt packages
|
||||||
apt:
|
apt:
|
||||||
pkg: "{{ item }}"
|
pkg: "{{ item }}"
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: yes
|
|
||||||
cache_valid_time: 600
|
|
||||||
register: install_packages
|
register: install_packages
|
||||||
until: install_packages|success
|
until: install_packages|success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
debug: False
|
debug: False
|
||||||
verbose: True
|
verbose: True
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
ceilometer_venv_tag: untagged
|
ceilometer_venv_tag: untagged
|
||||||
ceilometer_venv_bin: "/openstack/venvs/ceilometer-{{ ceilometer_venv_tag }}/bin"
|
ceilometer_venv_bin: "/openstack/venvs/ceilometer-{{ ceilometer_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,12 +13,27 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- ceilometer-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
|
tags:
|
||||||
|
- ceilometer-apt-packages
|
||||||
|
|
||||||
- name: Install apt packages
|
- name: Install apt packages
|
||||||
apt:
|
apt:
|
||||||
pkg: "{{ item }}"
|
pkg: "{{ item }}"
|
||||||
state: latest
|
state: latest
|
||||||
update_cache: yes
|
|
||||||
cache_valid_time: 600
|
|
||||||
register: install_packages
|
register: install_packages
|
||||||
until: install_packages|success
|
until: install_packages|success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
# Defines that the role will be deployed on a host machine
|
# Defines that the role will be deployed on a host machine
|
||||||
is_metal: true
|
is_metal: true
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
cinder_venv_tag: untagged
|
cinder_venv_tag: untagged
|
||||||
cinder_venv_bin: "/openstack/venvs/cinder-{{ cinder_venv_tag }}/bin"
|
cinder_venv_bin: "/openstack/venvs/cinder-{{ cinder_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- cinder-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- cinder-apt-packages
|
- cinder-apt-packages
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
debug: False
|
debug: False
|
||||||
verbose: True
|
verbose: True
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
glance_venv_tag: untagged
|
glance_venv_tag: untagged
|
||||||
glance_venv_bin: "/openstack/venvs/glance-{{ glance_venv_tag }}/bin"
|
glance_venv_bin: "/openstack/venvs/glance-{{ glance_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- glance-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- glance-apt-packages
|
- glance-apt-packages
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ heat_ceilometer_enabled: False
|
|||||||
debug: False
|
debug: False
|
||||||
verbose: True
|
verbose: True
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
heat_venv_tag: untagged
|
heat_venv_tag: untagged
|
||||||
heat_venv_bin: "/openstack/venvs/heat-{{ heat_venv_tag }}/bin"
|
heat_venv_bin: "/openstack/venvs/heat-{{ heat_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- heat-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- heat-apt-packages
|
- heat-apt-packages
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
debug: False
|
debug: False
|
||||||
verbose: True
|
verbose: True
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
horizon_venv_tag: untagged
|
horizon_venv_tag: untagged
|
||||||
horizon_venv_bin: "/openstack/venvs/horizon-{{ horizon_venv_tag }}/bin"
|
horizon_venv_bin: "/openstack/venvs/horizon-{{ horizon_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- horizon-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- horizon-apt-packages
|
- horizon-apt-packages
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
debug: False
|
debug: False
|
||||||
verbose: True
|
verbose: True
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
keystone_venv_tag: untagged
|
keystone_venv_tag: untagged
|
||||||
keystone_venv_bin: "/openstack/venvs/keystone-{{ keystone_venv_tag }}/bin"
|
keystone_venv_bin: "/openstack/venvs/keystone-{{ keystone_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- keystone-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- keystone-apt-packages
|
- keystone-apt-packages
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ is_metal: true
|
|||||||
debug: False
|
debug: False
|
||||||
verbose: True
|
verbose: True
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
neutron_venv_tag: untagged
|
neutron_venv_tag: untagged
|
||||||
neutron_venv_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
|
neutron_venv_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- neutron-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- neutron-apt-packages
|
- neutron-apt-packages
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ nova_ceilometer_enabled: False
|
|||||||
debug: False
|
debug: False
|
||||||
verbose: True
|
verbose: True
|
||||||
|
|
||||||
|
## APT Cache options
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
nova_venv_tag: untagged
|
nova_venv_tag: untagged
|
||||||
nova_venv_bin: "/openstack/venvs/nova-{{ nova_venv_tag }}/bin"
|
nova_venv_bin: "/openstack/venvs/nova-{{ nova_venv_tag }}/bin"
|
||||||
|
|||||||
@@ -13,14 +13,21 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- nova-apt-packages
|
||||||
|
- nova-compute-kvm-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- nova-apt-packages
|
- nova-apt-packages
|
||||||
- nova-compute-kvm-apt-packages
|
- nova-compute-kvm-apt-packages
|
||||||
|
|||||||
@@ -29,14 +29,20 @@
|
|||||||
- nova-install
|
- nova-install
|
||||||
- nova-novnc-git
|
- nova-novnc-git
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- nova-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- nova-apt-packages
|
- nova-apt-packages
|
||||||
- nova-novnc-apt-packages
|
- nova-novnc-apt-packages
|
||||||
|
|||||||
@@ -13,14 +13,21 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- nova-apt-packages
|
||||||
|
- nova-spice-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- nova-apt-packages
|
- nova-apt-packages
|
||||||
- nova-spice-apt-packages
|
- nova-spice-apt-packages
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- nova-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- nova-apt-packages
|
- nova-apt-packages
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ swift_ceilometer_enabled: False
|
|||||||
## Verbosity Options
|
## Verbosity Options
|
||||||
debug: False
|
debug: False
|
||||||
verbose: True
|
verbose: True
|
||||||
|
cache_timeout: 600
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
swift_venv_tag: untagged
|
swift_venv_tag: untagged
|
||||||
|
|||||||
@@ -13,14 +13,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Update apt sources
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
#in 1.9.x or we move to 2.0 (if tested working)
|
||||||
|
- name: Check apt last update file
|
||||||
|
stat:
|
||||||
|
path: /var/cache/apt
|
||||||
|
register: apt_cache_stat
|
||||||
|
tags:
|
||||||
|
- swift-apt-packages
|
||||||
|
|
||||||
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||||
register: apt_update
|
|
||||||
until: apt_update|success
|
|
||||||
retries: 5
|
|
||||||
delay: 2
|
|
||||||
tags:
|
tags:
|
||||||
- swift-apt-packages
|
- swift-apt-packages
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user