From e29f9d93c4989d745c9dc2ee44641f1b647994e5 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Fri, 8 Dec 2023 19:02:42 +0100 Subject: [PATCH] feat(tests): remove /etc/hosts testing, fix #2 --- molecule/default/verify.yml | 15 --------------- molecule/default_vagrant/verify.yml | 19 ------------------- molecule/with_custom_packages/verify.yml | 15 --------------- .../with_custom_packages_vagrant/verify.yml | 19 ------------------- 4 files changed, 68 deletions(-) diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index ccab792..1a5c0f3 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -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: package vim" block: - name: "Get packages facts" diff --git a/molecule/default_vagrant/verify.yml b/molecule/default_vagrant/verify.yml index 11070c7..1a5c0f3 100644 --- a/molecule/default_vagrant/verify.yml +++ b/molecule/default_vagrant/verify.yml @@ -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: package vim" block: - name: "Get packages facts" diff --git a/molecule/with_custom_packages/verify.yml b/molecule/with_custom_packages/verify.yml index d0323a7..30fe0f3 100644 --- a/molecule/with_custom_packages/verify.yml +++ b/molecule/with_custom_packages/verify.yml @@ -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 mariadb-server, apache2, consul:1.13.1-1" block: - name: "Get packages facts" diff --git a/molecule/with_custom_packages_vagrant/verify.yml b/molecule/with_custom_packages_vagrant/verify.yml index a7a429a..30fe0f3 100644 --- a/molecule/with_custom_packages_vagrant/verify.yml +++ b/molecule/with_custom_packages_vagrant/verify.yml @@ -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 mariadb-server, apache2, consul:1.13.1-1" block: - name: "Get packages facts"