blob: 0c2ec94d3c621ab1d788a8fedb13a4ba8d30cc9f [file] [log] [blame]
Zack Williams54f198d2017-12-22 10:12:46 -07001---
Matteo Scandolo3896c472017-08-01 13:31:42 -07002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Zack Williams82c88e92016-08-08 13:54:20 -070016# prereqs-common/tasks/main.yml
17
Zack Williams54f198d2017-12-22 10:12:46 -070018- name: "Check here on failure: 'https://guide.opencord.org/troubleshooting.html#prereqs-common-failures'"
Zack Williams82c88e92016-08-08 13:54:20 -070019 pause:
20 seconds: 10
21
22- name: Memory size Check
23 assert:
24 that: "ansible_memtotal_mb >= {{ min_memtotal_mb }}"
25
26- name: CPU quantity Check
27 assert:
28 that: "ansible_processor_vcpus >= {{ min_processor_vcpus }}"
29
30- name: CPU KVM Check
31 when: kvm_check
32 shell: "lsmod | grep kvm_"
33
34- name: DNS Lookup Check
Zack Williams95128762017-11-03 11:07:08 -070035 shell: "dig +short {{ dns_check_domain }} | grep '{{ dns_check_record }}'"
Zack Williamsb96c7252016-08-17 09:48:14 -070036 register: dns_lookup_check_result
37 until: dns_lookup_check_result.rc == 0
38 retries: 3
39 delay: 1
Zack Williams35624562016-08-28 17:12:26 -070040 tags:
41 - skip_ansible_lint # tried assert + dig (below), but it fails quickly and won't loop
42 # assert:
43 # that: "{{ lookup('dig', dns_check_domain ) == dns_check_ipv4 }}"
Zack Williams82c88e92016-08-08 13:54:20 -070044
45- name: DNS Global Root Connectivity Check
Zack Williams95128762017-11-03 11:07:08 -070046 shell: "dig @{{ item }} +trace +short {{ dns_check_domain }} | grep '{{ dns_check_record }}'"
Zack Williams79286962017-07-10 12:24:37 -070047 with_items:
48 - 192.5.5.241
49 - 198.41.0.4
50 - 199.7.91.13
Zack Williamsb96c7252016-08-17 09:48:14 -070051 register: dns_global_check_result
52 until: dns_global_check_result.rc == 0
53 retries: 3
54 delay: 1
Zack Williams35624562016-08-28 17:12:26 -070055 tags:
56 - skip_ansible_lint # too complex for lookup('dig', ...) to handle
Zack Williams82c88e92016-08-08 13:54:20 -070057
58- name: HTTP Download Check
59 get_url:
Zack Williams79286962017-07-10 12:24:37 -070060 url: "http://cord.staging.wpengine.com/wp-content/uploads/2016/07/cord-tm-logo.png"
61 checksum: "sha256:099c777e4c8ad76a066299159622b4fa6bd2515cefafc2851df67f7f4cce6ee8"
Zack Williams82c88e92016-08-08 13:54:20 -070062 dest: /tmp/http_dl_check
Zack Williams1396aa32017-06-06 10:28:29 -070063 retries: 3
64 delay: 1
Zack Williams82c88e92016-08-08 13:54:20 -070065
66- name: HTTPS Download Check
67 get_url:
Zack Williams79286962017-07-10 12:24:37 -070068 url: "https://jenkins.opencord.org/static/8d0f081d/images/headshot.png"
69 checksum: "sha256:690e82fb98ffb2b4b232d9b9cf9cc52eb7972e56a84902f6d1150b75456058c6"
Zack Williams82c88e92016-08-08 13:54:20 -070070 dest: /tmp/https_dl_check
Zack Williams1396aa32017-06-06 10:28:29 -070071 retries: 3
72 delay: 1
Zack Williams82c88e92016-08-08 13:54:20 -070073