Role test-prerequisites: improve tasks; update OS to current debian
stable
This commit is contained in:
parent
3270b5cc3e
commit
1f0b5925a8
1 changed files with 8 additions and 10 deletions
|
@ -1,25 +1,23 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: assert IPv4 DNS entry
|
- name: assert IPv4 DNS entry
|
||||||
local_action: shell dig A {{ inventory_hostname }} | egrep '^{{ inventory_hostname }}'
|
local_action: shell dig +short A {{ inventory_hostname }} | egrep '^{{ ansible_default_ipv4.address }}'
|
||||||
changed_when: False
|
changed_when: False
|
||||||
when: "{{ require_dns | default('True') }}"
|
|
||||||
|
|
||||||
- name: assert IPv6 DNS entry
|
- name: assert IPv6 DNS entry
|
||||||
local_action: shell dig AAAA {{ inventory_hostname }} | egrep '^{{ inventory_hostname }}'
|
local_action: shell dig +short AAAA {{ inventory_hostname }} | egrep '^{{ ansible_default_ipv6.address }}'
|
||||||
changed_when: False
|
changed_when: False
|
||||||
when: "{{ require_dns | default('True') }}"
|
|
||||||
|
|
||||||
- name: test access to admin account (ssh key neccessary!)
|
- name: Test access to admin account
|
||||||
command: "true"
|
command: "true"
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
- name: test access to root account
|
- name: Test root access for admin account
|
||||||
command: "true"
|
command: "true"
|
||||||
changed_when: False
|
changed_when: False
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
|
||||||
|
|
||||||
- name: fail on wrong OS type and version # TODO: include debian
|
- name: Check for correct OS type and version
|
||||||
fail: msg="unsupported OS type or version - {{ ansible_distribution }} {{ ansible_distribution_major_version }}"
|
fail: msg="unsupported OS type or version - {{ ansible_distribution }} {{ ansible_distribution_major_version }}"
|
||||||
when: not ( ( ansible_distribution=="Ubuntu" and ansible_distribution_major_version|int==14 ) or ( ansible_distribution=="Debian" and ansible_distribution_major_version|int==8 ) )
|
when:
|
||||||
|
- ansible_distribution != "Debian"
|
||||||
|
- ansible_distribution_major_version|int != "9"
|
||||||
|
|
Loading…
Reference in a new issue