2023-12-01 21:52:48 +00:00
|
|
|
---
|
|
|
|
- name: Verify
|
|
|
|
hosts: all
|
|
|
|
gather_facts: true
|
2023-12-03 16:27:02 +00:00
|
|
|
become: true
|
2023-12-01 21:52:48 +00:00
|
|
|
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
|