ansible-ffibk/roles/test-prerequisites/tasks/main.yml

24 lines
762 B
YAML
Raw Normal View History

2016-07-06 16:34:54 +02:00
---
- name: assert IPv4 DNS entry
local_action: shell dig +short A {{ inventory_hostname }} | egrep '^{{ ansible_default_ipv4.address }}'
2016-07-06 16:34:54 +02:00
changed_when: False
- name: assert IPv6 DNS entry
local_action: shell dig +short AAAA {{ inventory_hostname }} | egrep '^{{ ansible_default_ipv6.address }}'
2016-07-06 16:34:54 +02:00
changed_when: False
- name: Test access to admin account
2016-07-06 16:34:54 +02:00
command: "true"
changed_when: False
- name: Test root access for admin account
2016-07-06 16:34:54 +02:00
command: "true"
changed_when: False
become: True
- name: Check for correct OS type and version
2016-07-06 16:34:54 +02:00
fail: msg="unsupported OS type or version - {{ ansible_distribution }} {{ ansible_distribution_major_version }}"
when:
- ansible_distribution != "Debian"
- ansible_distribution_major_version|int != "9"