import_vault_root_ca/molecule/default_vagrant/verify.yml

29 lines
1.1 KiB
YAML
Raw Permalink Normal View History

---
- name: Verify
hosts: all
gather_facts: true
2023-12-03 16:27:02 +00:00
become: true
tasks:
- name: "Test: directory /usr/local/share/ca-certificates"
block:
- name: "Stat directory /usr/local/share/ca-certificates"
ansible.builtin.stat:
path: "/usr/local/share/ca-certificates"
register: usr_local_share_ca_certificates
- name: "Find files in directory /usr/local/share/ca-certificates"
ansible.builtin.find:
paths: "/usr/local/share/ca-certificates"
file_type: file
register: usr_local_share_ca_certificates_ls
- name: "Verify directory /usr/local/share/ca-certificates"
ansible.builtin.assert:
that:
- usr_local_share_ca_certificates.stat.exists
- usr_local_share_ca_certificates.stat.isdir
- usr_local_share_ca_certificates.stat.pw_name == 'root'
- usr_local_share_ca_certificates.stat.gr_name == 'root'
- usr_local_share_ca_certificates.stat.mode == '0755'
- (usr_local_share_ca_certificates_ls.files|length) == 0