blob: f9ac2cd262c4bc159335ac561213723976dd9ebf [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 }}"
33 with_items: "{{ dns_roots }}"
Zack Williamsb96c7252016-08-17 09:48:14 -070034 register: dns_global_check_result
35 until: dns_global_check_result.rc == 0
36 retries: 3
37 delay: 1
Zack Williams35624562016-08-28 17:12:26 -070038 tags:
39 - skip_ansible_lint # too complex for lookup('dig', ...) to handle
Zack Williams82c88e92016-08-08 13:54:20 -070040
41- name: HTTP Download Check
42 get_url:
43 url: "{{ http_dl_url }}"
44 checksum: "{{ http_dl_cksum }}"
45 dest: /tmp/http_dl_check
Zack Williams1396aa32017-06-06 10:28:29 -070046 retries: 3
47 delay: 1
Zack Williams82c88e92016-08-08 13:54:20 -070048
49- name: HTTPS Download Check
50 get_url:
51 url: "{{ https_dl_url }}"
52 checksum: "{{ https_dl_cksum }}"
53 dest: /tmp/https_dl_check
Zack Williams1396aa32017-06-06 10:28:29 -070054 retries: 3
55 delay: 1
Zack Williams82c88e92016-08-08 13:54:20 -070056