added default test for container health
This commit is contained in:
parent
a676159989
commit
11702792f3
@ -1,9 +1,23 @@
|
||||
---
|
||||
# This is an example playbook to execute Ansible tests.
|
||||
- name: Verify
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: "Test: file /etc/hosts"
|
||||
block:
|
||||
- name: "Stat file /etc/hosts"
|
||||
ansible.builtin.stat:
|
||||
path: "/etc/hosts"
|
||||
register: stat_etc_hosts
|
||||
|
||||
- name: "Verify file /etc/hosts"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- stat_etc_hosts.stat.exists
|
||||
- stat_etc_hosts.stat.isreg
|
||||
- stat_etc_hosts.stat.pw_name == 'root'
|
||||
- stat_etc_hosts.stat.gr_name == 'root'
|
||||
|
||||
- name: "Test: directory /usr/local/share/ca-certificates"
|
||||
block:
|
||||
- name: "Stat directory /usr/local/share/ca-certificates"
|
||||
|
@ -1,9 +1,23 @@
|
||||
---
|
||||
# This is an example playbook to execute Ansible tests.
|
||||
- name: Verify
|
||||
hosts: all
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: "Test: file /etc/hosts"
|
||||
block:
|
||||
- name: "Stat file /etc/hosts"
|
||||
ansible.builtin.stat:
|
||||
path: "/etc/hosts"
|
||||
register: stat_etc_hosts
|
||||
|
||||
- name: "Verify file /etc/hosts"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- stat_etc_hosts.stat.exists
|
||||
- stat_etc_hosts.stat.isreg
|
||||
- stat_etc_hosts.stat.pw_name == 'root'
|
||||
- stat_etc_hosts.stat.gr_name == 'root'
|
||||
|
||||
- name: "Test: directory /usr/local/share/ca-certificates"
|
||||
block:
|
||||
- name: "Stat directory /usr/local/share/ca-certificates"
|
||||
|
Loading…
Reference in New Issue
Block a user