Zack Williams | 82c88e9 | 2016-08-08 13:54:20 -0700 | [diff] [blame] | 1 | --- |
| 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 Williams | b96c725 | 2016-08-17 09:48:14 -0700 | [diff] [blame] | 22 | register: dns_lookup_check_result |
| 23 | until: dns_lookup_check_result.rc == 0 |
| 24 | retries: 3 |
| 25 | delay: 1 |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 26 | 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 Williams | 82c88e9 | 2016-08-08 13:54:20 -0700 | [diff] [blame] | 30 | |
| 31 | - name: DNS Global Root Connectivity Check |
| 32 | shell: "dig @{{ item }} +trace +short {{ dns_check_domain }} | grep {{ dns_check_ipv4 }}" |
Zack Williams | 7928696 | 2017-07-10 12:24:37 -0700 | [diff] [blame] | 33 | with_items: |
| 34 | - 192.5.5.241 |
| 35 | - 198.41.0.4 |
| 36 | - 199.7.91.13 |
Zack Williams | b96c725 | 2016-08-17 09:48:14 -0700 | [diff] [blame] | 37 | register: dns_global_check_result |
| 38 | until: dns_global_check_result.rc == 0 |
| 39 | retries: 3 |
| 40 | delay: 1 |
Zack Williams | 3562456 | 2016-08-28 17:12:26 -0700 | [diff] [blame] | 41 | tags: |
| 42 | - skip_ansible_lint # too complex for lookup('dig', ...) to handle |
Zack Williams | 82c88e9 | 2016-08-08 13:54:20 -0700 | [diff] [blame] | 43 | |
| 44 | - name: HTTP Download Check |
| 45 | get_url: |
Zack Williams | 7928696 | 2017-07-10 12:24:37 -0700 | [diff] [blame] | 46 | url: "http://cord.staging.wpengine.com/wp-content/uploads/2016/07/cord-tm-logo.png" |
| 47 | checksum: "sha256:099c777e4c8ad76a066299159622b4fa6bd2515cefafc2851df67f7f4cce6ee8" |
Zack Williams | 82c88e9 | 2016-08-08 13:54:20 -0700 | [diff] [blame] | 48 | dest: /tmp/http_dl_check |
Zack Williams | 1396aa3 | 2017-06-06 10:28:29 -0700 | [diff] [blame] | 49 | retries: 3 |
| 50 | delay: 1 |
Zack Williams | 82c88e9 | 2016-08-08 13:54:20 -0700 | [diff] [blame] | 51 | |
| 52 | - name: HTTPS Download Check |
| 53 | get_url: |
Zack Williams | 7928696 | 2017-07-10 12:24:37 -0700 | [diff] [blame] | 54 | url: "https://jenkins.opencord.org/static/8d0f081d/images/headshot.png" |
| 55 | checksum: "sha256:690e82fb98ffb2b4b232d9b9cf9cc52eb7972e56a84902f6d1150b75456058c6" |
Zack Williams | 82c88e9 | 2016-08-08 13:54:20 -0700 | [diff] [blame] | 56 | dest: /tmp/https_dl_check |
Zack Williams | 1396aa3 | 2017-06-06 10:28:29 -0700 | [diff] [blame] | 57 | retries: 3 |
| 58 | delay: 1 |
Zack Williams | 82c88e9 | 2016-08-08 13:54:20 -0700 | [diff] [blame] | 59 | |