blob: c4478e2682ac437c4094d952f4b72d8d698459d8 [file] [log] [blame]
Zack Williams82c88e92016-08-08 13:54:20 -07001---
2# prereqs-common/tasks/main.yml
3
4- name: "Check here on failure: 'https://wiki.opencord.org/display/CORD/Troubleshooting+a+Build'"
5 pause:
6 seconds: 10
7
8- name: Memory size Check
9 assert:
10 that: "ansible_memtotal_mb >= {{ min_memtotal_mb }}"
11
12- name: CPU quantity Check
13 assert:
14 that: "ansible_processor_vcpus >= {{ min_processor_vcpus }}"
15
16- name: CPU KVM Check
17 when: kvm_check
18 shell: "lsmod | grep kvm_"
19
20- name: DNS Lookup Check
21 shell: "dig +short {{ dns_check_domain }} | grep {{ dns_check_ipv4 }}"
Zack Williamsb96c7252016-08-17 09:48:14 -070022 register: dns_lookup_check_result
23 until: dns_lookup_check_result.rc == 0
24 retries: 3
25 delay: 1
Zack Williams35624562016-08-28 17:12:26 -070026 tags:
27 - skip_ansible_lint # tried assert + dig (below), but it fails quickly and won't loop
28 # assert:
29 # that: "{{ lookup('dig', dns_check_domain ) == dns_check_ipv4 }}"
Zack Williams82c88e92016-08-08 13:54:20 -070030
31- name: DNS Global Root Connectivity Check
32 shell: "dig @{{ item }} +trace +short {{ dns_check_domain }} | grep {{ dns_check_ipv4 }}"
Zack Williams79286962017-07-10 12:24:37 -070033 with_items:
34 - 192.5.5.241
35 - 198.41.0.4
36 - 199.7.91.13
Zack Williamsb96c7252016-08-17 09:48:14 -070037 register: dns_global_check_result
38 until: dns_global_check_result.rc == 0
39 retries: 3
40 delay: 1
Zack Williams35624562016-08-28 17:12:26 -070041 tags:
42 - skip_ansible_lint # too complex for lookup('dig', ...) to handle
Zack Williams82c88e92016-08-08 13:54:20 -070043
44- name: HTTP Download Check
45 get_url:
Zack Williams79286962017-07-10 12:24:37 -070046 url: "http://cord.staging.wpengine.com/wp-content/uploads/2016/07/cord-tm-logo.png"
47 checksum: "sha256:099c777e4c8ad76a066299159622b4fa6bd2515cefafc2851df67f7f4cce6ee8"
Zack Williams82c88e92016-08-08 13:54:20 -070048 dest: /tmp/http_dl_check
Zack Williams1396aa32017-06-06 10:28:29 -070049 retries: 3
50 delay: 1
Zack Williams82c88e92016-08-08 13:54:20 -070051
52- name: HTTPS Download Check
53 get_url:
Zack Williams79286962017-07-10 12:24:37 -070054 url: "https://jenkins.opencord.org/static/8d0f081d/images/headshot.png"
55 checksum: "sha256:690e82fb98ffb2b4b232d9b9cf9cc52eb7972e56a84902f6d1150b75456058c6"
Zack Williams82c88e92016-08-08 13:54:20 -070056 dest: /tmp/https_dl_check
Zack Williams1396aa32017-06-06 10:28:29 -070057 retries: 3
58 delay: 1
Zack Williams82c88e92016-08-08 13:54:20 -070059