Skip to content

Commit

Permalink
feat(test): remove /etc/hosts tests, fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
ednxzu committed Dec 9, 2023
1 parent f189113 commit 6e45c9e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 68 deletions.
15 changes: 0 additions & 15 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@
gather_facts: true
become: true
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: packages ansible-lint"
block:
- name: "Get pipx installed packages"
Expand Down
19 changes: 0 additions & 19 deletions molecule/default_vagrant/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@
gather_facts: true
become: true
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"
vars:
etc_hosts_group:
ubuntu: "adm"
debian: "root"
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 == etc_hosts_group[(ansible_distribution|lower)]

- name: "Test: packages ansible-lint"
block:
- name: "Get pipx installed packages"
Expand Down
15 changes: 0 additions & 15 deletions molecule/with_custom_packages/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@
gather_facts: true
become: true
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: packages pip, vault-cli, yamllint, ansible-core"
block:
- name: "Get pipx installed packages"
Expand Down
19 changes: 0 additions & 19 deletions molecule/with_custom_packages_vagrant/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@
gather_facts: true
become: true
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"
vars:
etc_hosts_group:
ubuntu: "adm"
debian: "root"
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 == etc_hosts_group[(ansible_distribution|lower)]

- name: "Test: packages pip, vault-cli, yamllint, ansible-core"
block:
- name: "Get pipx installed packages"
Expand Down

0 comments on commit 6e45c9e

Please sign in to comment.