diff --git a/LICENSE b/LICENSE index 9ef042d..c9a37e5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017 Jeff Geerling +Copyright (c) 2017 Bertrand Lanson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index 3ea4520..7ee46e6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Update MOTD +update_motd ========= > This repository is only a mirror. Development and testing is done on a private gitlab server. @@ -51,4 +51,4 @@ MIT / BSD Author Information ------------------ -This role was created by Bertrand Lanson in 2023. \ No newline at end of file +This role was created by Bertrand Lanson in 2023. diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml new file mode 100644 index 0000000..bf52da2 --- /dev/null +++ b/molecule/default/verify.yml @@ -0,0 +1,19 @@ +--- +- 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' diff --git a/molecule/with_custom_ascii/verify.yml b/molecule/with_custom_ascii/verify.yml new file mode 100644 index 0000000..bf52da2 --- /dev/null +++ b/molecule/with_custom_ascii/verify.yml @@ -0,0 +1,19 @@ +--- +- 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'