blob: 2b19b9b54a74bf679da0ca395f953b369391769b [file] [log] [blame]
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
# prereqs-common/tasks/main.yml
- name: "Check here on failure: 'https://wiki.opencord.org/display/CORD/Troubleshooting+a+Build'"
pause:
seconds: 10
- name: Memory size Check
assert:
that: "ansible_memtotal_mb >= {{ min_memtotal_mb }}"
- name: CPU quantity Check
assert:
that: "ansible_processor_vcpus >= {{ min_processor_vcpus }}"
- name: CPU KVM Check
when: kvm_check
shell: "lsmod | grep kvm_"
- name: DNS Lookup Check
shell: "dig +short {{ dns_check_domain }} | grep {{ dns_check_ipv4 }}"
register: dns_lookup_check_result
until: dns_lookup_check_result.rc == 0
retries: 3
delay: 1
tags:
- skip_ansible_lint # tried assert + dig (below), but it fails quickly and won't loop
# assert:
# that: "{{ lookup('dig', dns_check_domain ) == dns_check_ipv4 }}"
- name: DNS Global Root Connectivity Check
shell: "dig @{{ item }} +trace +short {{ dns_check_domain }} | grep {{ dns_check_ipv4 }}"
with_items:
- 192.5.5.241
- 198.41.0.4
- 199.7.91.13
register: dns_global_check_result
until: dns_global_check_result.rc == 0
retries: 3
delay: 1
tags:
- skip_ansible_lint # too complex for lookup('dig', ...) to handle
- name: HTTP Download Check
get_url:
url: "http://cord.staging.wpengine.com/wp-content/uploads/2016/07/cord-tm-logo.png"
checksum: "sha256:099c777e4c8ad76a066299159622b4fa6bd2515cefafc2851df67f7f4cce6ee8"
dest: /tmp/http_dl_check
retries: 3
delay: 1
- name: HTTPS Download Check
get_url:
url: "https://jenkins.opencord.org/static/8d0f081d/images/headshot.png"
checksum: "sha256:690e82fb98ffb2b4b232d9b9cf9cc52eb7972e56a84902f6d1150b75456058c6"
dest: /tmp/https_dl_check
retries: 3
delay: 1