From 8b4c6f4c983fa29be29acfd0ed24cb463596e9b2 Mon Sep 17 00:00:00 2001 From: Florian Rey Date: Wed, 18 Oct 2023 15:39:25 +0200 Subject: [PATCH] Update goss --- molecule/Dockerfile.debian.bookworm.j2 | 2 +- molecule/Dockerfile.debian.bullseye.j2 | 2 +- molecule/Dockerfile.debian.buster.j2 | 2 +- .../goss/users_authorized_keys.yaml.j2 | 19 ++-- molecule/accounts/goss/users_keys.yaml.j2 | 50 ++++------ molecule/ansible/goss/config.yaml.j2 | 6 +- molecule/ansible/goss/group_vars.yaml.j2 | 18 ++-- molecule/ansible/goss/host_vars.yaml.j2 | 18 ++-- molecule/ansible/goss/hosts.yaml.j2 | 6 +- molecule/apparmor/goss/configs.yaml.j2 | 18 ++-- molecule/apt/goss/configs.yaml.j2 | 18 ++-- molecule/apt/goss/preferences.yaml.j2 | 97 +++++++++---------- .../apt/goss/repositories.default.yaml.j2 | 36 +++---- .../apt/goss/repositories.exclusive.yaml.j2 | 4 +- molecule/apt/goss/sources_list.yaml.j2 | 6 +- molecule/aptly/goss/config.yaml.j2 | 20 ++-- molecule/backup_manager/goss/configs.yaml.j2 | 40 ++++---- molecule/bind/goss/configs.yaml.j2 | 6 +- molecule/bind/goss/options.yaml.j2 | 4 +- molecule/bind/goss/zones.yaml.j2 | 12 +-- molecule/cloud_init/goss/configs.yaml.j2 | 18 ++-- molecule/composer/goss/users_auth.yaml.j2 | 24 ++--- molecule/cron/goss/files.yaml.j2 | 41 ++++---- molecule/dhcp/goss/default.yaml.j2 | 10 +- molecule/dnsmasq/goss/configs.yaml.j2 | 18 ++-- molecule/docker/goss/applications.yaml.j2 | 3 +- molecule/docker/goss/config_daemon.yaml.j2 | 16 ++- molecule/elasticsearch.7/goss/config.yaml.j2 | 14 ++- .../elasticsearch.7/goss/environment.yaml.j2 | 12 +-- molecule/environment/goss/default.yaml.j2 | 38 ++++---- molecule/fail2ban/goss/config.yaml.j2 | 6 +- molecule/files/goss/content.yaml.j2 | 12 +-- molecule/files/goss/copy.yaml.j2 | 6 +- molecule/files/goss/template.yaml.j2 | 12 +-- molecule/files/goss/url.yaml.j2 | 2 +- molecule/git/goss/config.yaml.j2 | 20 ++-- molecule/gitlab/goss/configs.yaml.j2 | 18 ++-- molecule/grafana/goss/config.yaml.j2 | 6 +- molecule/grafana_agent/goss/config.yaml.j2 | 6 +- molecule/haproxy/goss/config.yaml.j2 | 6 +- molecule/haproxy/goss/configs.yaml.j2 | 18 ++-- molecule/haproxy/goss/environment.yaml.j2 | 12 +-- molecule/haproxy/goss/errorfiles.yaml.j2 | 18 ++-- molecule/influxdb/goss/config.yaml.j2 | 10 +- molecule/keepalived/goss/config.yaml.j2 | 6 +- molecule/keepalived/goss/environment.yaml.j2 | 12 +-- molecule/logrotate/goss/configs.yaml.j2 | 28 +++--- molecule/maxscale.2.3/goss/default.yaml.j2 | 4 +- molecule/maxscale.2.4/goss/default.yaml.j2 | 4 +- molecule/maxscale.2.5/goss/config.yaml.j2 | 6 +- molecule/maxscale.2.5/goss/configs.yaml.j2 | 18 ++-- molecule/maxscale.2.5/goss/default.yaml.j2 | 4 +- molecule/maxscale.2.5/goss/users.yaml.j2 | 11 +-- molecule/maxscale.23.02/goss/config.yaml.j2 | 6 +- molecule/maxscale.23.02/goss/configs.yaml.j2 | 18 ++-- molecule/maxscale.23.02/goss/default.yaml.j2 | 4 +- molecule/maxscale.23.02/goss/users.yaml.j2 | 11 +-- molecule/maxscale.6.1/goss/config.yaml.j2 | 6 +- molecule/maxscale.6.1/goss/configs.yaml.j2 | 18 ++-- molecule/maxscale.6.1/goss/default.yaml.j2 | 4 +- molecule/maxscale.6.1/goss/users.yaml.j2 | 11 +-- molecule/mongodb.4.4/goss/config.yaml.j2 | 12 +-- molecule/motd/goss/scripts.yaml.j2 | 24 ++--- molecule/mysql.5.7/goss/config.yaml.j2 | 14 ++- molecule/mysql.5.7/goss/configs.yaml.j2 | 30 +++--- molecule/mysql.8.0/goss/config.yaml.j2 | 14 ++- molecule/mysql.8.0/goss/configs.yaml.j2 | 30 +++--- .../mysql.mariadb.10.11/goss/config.yaml.j2 | 14 ++- .../mysql.mariadb.10.11/goss/configs.yaml.j2 | 30 +++--- molecule/network/goss/hosts.yaml.j2 | 10 +- .../network/goss/interfaces_config.yaml.j2 | 6 +- .../network/goss/interfaces_configs.yaml.j2 | 18 ++-- molecule/network/goss/netplan_configs.yaml.j2 | 9 +- molecule/network/goss/resolver_config.yaml.j2 | 6 +- molecule/network/goss/routing_tables.yaml.j2 | 12 +-- molecule/nginx/goss/config.yaml.j2 | 22 ++--- molecule/nginx/goss/configs.yaml.j2 | 34 +++---- molecule/ngrok/goss/configs.yaml.j2 | 22 ++--- molecule/ohmyzsh/goss/custom_themes.yaml.j2 | 18 ++-- molecule/ohmyzsh/goss/users.yaml.j2 | 20 ++-- .../pam_ssh_agent_auth/goss/default.yaml.j2 | 8 +- molecule/php.5.6/goss/configs.yaml.j2 | 58 +++++------ molecule/php.5.6/goss/fpm_pools.yaml.j2 | 48 ++++----- molecule/php.7.4/goss/configs.yaml.j2 | 58 +++++------ molecule/php.7.4/goss/fpm_pools.yaml.j2 | 48 ++++----- molecule/php.8.2/goss/configs.yaml.j2 | 58 +++++------ molecule/php.8.2/goss/fpm_pools.yaml.j2 | 52 +++++----- molecule/postgresql.9.4/goss/config.yaml.j2 | 12 +-- molecule/proftpd/goss/configs.yaml.j2 | 24 ++--- molecule/proftpd/goss/users.yaml.j2 | 6 +- molecule/prometheus/goss/default.yaml.j2 | 12 +-- molecule/promtail/goss/default.yaml.j2 | 6 +- molecule/redis.6.0/goss/config.yaml.j2 | 20 ++-- molecule/redis.7.0/goss/config.yaml.j2 | 20 ++-- molecule/rsyslog/goss/config.yaml.j2 | 12 +-- molecule/rsyslog/goss/configs.yaml.j2 | 18 ++-- molecule/sensu_go/goss/config.yaml.j2 | 10 +- molecule/shorewall/goss/config.yaml.j2 | 8 +- molecule/shorewall/goss/configs.yaml.j2 | 18 ++-- molecule/ssh/goss/config.yaml.j2 | 40 ++++---- molecule/ssh/goss/default.yaml.j2 | 4 +- molecule/sudo/goss/sudoers.yaml.j2 | 18 ++-- molecule/supervisor/goss/config.yaml.j2 | 20 ++-- molecule/supervisor/goss/configs.yaml.j2 | 32 +++--- molecule/systemd/goss/system_configs.yaml.j2 | 18 ++-- .../systemd/goss/tmpfiles_configs.yaml.j2 | 18 ++-- molecule/telegraf/goss/config.yaml.j2 | 20 ++-- molecule/telegraf/goss/configs.yaml.j2 | 32 +++--- molecule/timezone/goss/default.yaml.j2 | 4 +- molecule/vim/goss/config.yaml.j2 | 12 +-- 110 files changed, 801 insertions(+), 1159 deletions(-) diff --git a/molecule/Dockerfile.debian.bookworm.j2 b/molecule/Dockerfile.debian.bookworm.j2 index b2c60f329..91ae7935c 100644 --- a/molecule/Dockerfile.debian.bookworm.j2 +++ b/molecule/Dockerfile.debian.bookworm.j2 @@ -1,7 +1,7 @@ FROM {{ item.image }} # Versions -ENV GOSS_VERSION=0.3.23 +ENV GOSS_VERSION=0.4.2 ENV LC_ALL=C.UTF-8 diff --git a/molecule/Dockerfile.debian.bullseye.j2 b/molecule/Dockerfile.debian.bullseye.j2 index b2c60f329..91ae7935c 100644 --- a/molecule/Dockerfile.debian.bullseye.j2 +++ b/molecule/Dockerfile.debian.bullseye.j2 @@ -1,7 +1,7 @@ FROM {{ item.image }} # Versions -ENV GOSS_VERSION=0.3.23 +ENV GOSS_VERSION=0.4.2 ENV LC_ALL=C.UTF-8 diff --git a/molecule/Dockerfile.debian.buster.j2 b/molecule/Dockerfile.debian.buster.j2 index 4e59b1c14..99d630de1 100644 --- a/molecule/Dockerfile.debian.buster.j2 +++ b/molecule/Dockerfile.debian.buster.j2 @@ -1,7 +1,7 @@ FROM {{ item.image }} # Versions -ENV GOSS_VERSION=0.3.23 +ENV GOSS_VERSION=0.4.2 ENV LC_ALL=C.UTF-8 diff --git a/molecule/accounts/goss/users_authorized_keys.yaml.j2 b/molecule/accounts/goss/users_authorized_keys.yaml.j2 index 768dc8aa0..202af56f0 100644 --- a/molecule/accounts/goss/users_authorized_keys.yaml.j2 +++ b/molecule/accounts/goss/users_authorized_keys.yaml.j2 @@ -26,25 +26,25 @@ file: filetype: file owner: user_ak_verbose_syntax mode: "0600" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }} # Flatten /home/user_ak_flatten/.ssh/authorized_keys: exists: true filetype: file owner: user_ak_flatten mode: "0600" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }} # Multiple /home/user_ak_multiple/.ssh/authorized_keys: exists: true filetype: file owner: user_ak_multiple mode: "0600" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}" - - "{{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }} + {{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') | indent(4) }} # File /home/user_ak_file/.ssh/authorized_keys: exists: false @@ -53,9 +53,8 @@ file: filetype: file owner: user_ak_file mode: "0600" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}" - - "!{{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }} # State /home/user_ak_state_ignore/.ssh/authorized_keys: exists: false diff --git a/molecule/accounts/goss/users_keys.yaml.j2 b/molecule/accounts/goss/users_keys.yaml.j2 index b8d5dd603..4ffb0a45a 100644 --- a/molecule/accounts/goss/users_keys.yaml.j2 +++ b/molecule/accounts/goss/users_keys.yaml.j2 @@ -50,10 +50,8 @@ file: owner: user_k_private group: user_k_private mode: "0600" - contains: -{% for line in lookup('ansible.builtin.file', 'fixtures/key_1').splitlines() %} - - "{{ line }}" -{% endfor %} + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1') | indent(4) }} /home/user_k_private/.ssh/id_rsa.pub: exists: false # Public @@ -71,8 +69,8 @@ file: owner: user_k_public group: user_k_public mode: "0644" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }} # Verbose syntax /home/user_k_verbose_syntax/.ssh: exists: true @@ -86,18 +84,16 @@ file: owner: user_k_verbose_syntax group: user_k_verbose_syntax mode: "0600" - contains: -{% for line in lookup('ansible.builtin.file', 'fixtures/key_1').splitlines() %} - - "{{ line }}" -{% endfor %} + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1') | indent(4) }} /home/user_k_verbose_syntax/.ssh/id_rsa.pub: exists: true filetype: file owner: user_k_verbose_syntax group: user_k_verbose_syntax mode: "0644" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }} # Flatten /home/user_k_flatten/.ssh: exists: true @@ -111,18 +107,16 @@ file: owner: user_k_flatten group: user_k_flatten mode: "0600" - contains: -{% for line in lookup('ansible.builtin.file', 'fixtures/key_1').splitlines() %} - - "{{ line }}" -{% endfor %} + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1') | indent(4) }} /home/user_k_flatten/.ssh/id_rsa.pub: exists: true filetype: file owner: user_k_flatten group: user_k_flatten mode: "0644" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }} # Multiple /home/user_k_multiple/.ssh: exists: true @@ -136,36 +130,32 @@ file: owner: user_k_multiple group: user_k_multiple mode: "0600" - contains: -{% for line in lookup('ansible.builtin.file', 'fixtures/key_1').splitlines() %} - - "{{ line }}" -{% endfor %} + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1') | indent(4) }} /home/user_k_multiple/.ssh/id_rsa_1.pub: exists: true filetype: file owner: user_k_multiple group: user_k_multiple mode: "0644" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }} /home/user_k_multiple/.ssh/id_rsa_2: exists: true filetype: file owner: user_k_multiple group: user_k_multiple mode: "0600" - contains: -{% for line in lookup('ansible.builtin.file', 'fixtures/key_2').splitlines() %} - - "{{ line }}" -{% endfor %} + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_2') | indent(4) }} /home/user_k_multiple/.ssh/id_rsa_2.pub: exists: true filetype: file owner: user_k_multiple group: user_k_multiple mode: "0644" - contains: - - "{{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') }}" + contents: | + {{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') | indent(4) }} # State /home/user_k_state_ignore/.ssh: exists: false diff --git a/molecule/ansible/goss/config.yaml.j2 b/molecule/ansible/goss/config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/ansible/goss/config.yaml.j2 +++ b/molecule/ansible/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/ansible/goss/group_vars.yaml.j2 b/molecule/ansible/goss/group_vars.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/ansible/goss/group_vars.yaml.j2 +++ b/molecule/ansible/goss/group_vars.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/ansible/goss/host_vars.yaml.j2 b/molecule/ansible/goss/host_vars.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/ansible/goss/host_vars.yaml.j2 +++ b/molecule/ansible/goss/host_vars.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/ansible/goss/hosts.yaml.j2 b/molecule/ansible/goss/hosts.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/ansible/goss/hosts.yaml.j2 +++ b/molecule/ansible/goss/hosts.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/apparmor/goss/configs.yaml.j2 b/molecule/apparmor/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/apparmor/goss/configs.yaml.j2 +++ b/molecule/apparmor/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/apt/goss/configs.yaml.j2 b/molecule/apt/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/apt/goss/configs.yaml.j2 +++ b/molecule/apt/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/apt/goss/preferences.yaml.j2 b/molecule/apt/goss/preferences.yaml.j2 index 88fd28a1a..58266b855 100644 --- a/molecule/apt/goss/preferences.yaml.j2 +++ b/molecule/apt/goss/preferences.yaml.j2 @@ -9,40 +9,40 @@ file: owner: root group: root mode: "0644" - contains: - - "Package: git git-*" - - "Pin: release a={{ ansible_facts.distribution_release }}-backports" - - "Pin-Priority: 1000" + contents: | + Package: git git-* + Pin: release a={{ ansible_facts.distribution_release }}-backports + Pin-Priority: 1000 {{ tests_dir }}/default/libssl1_0_0: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "Package: libssl1.0.0" - - "Pin: release a={{ ansible_facts.distribution_release }}-backports" - - "Pin-Priority: 1000" + contents: | + Package: libssl1.0.0 + Pin: release a={{ ansible_facts.distribution_release }}-backports + Pin-Priority: 1000 {{ tests_dir }}/default/php: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "Package: php php-* /^php[1-9]+/" - - "Pin: origin packages.sury.org" - - "Pin-Priority: 300" + contents: | + Package: php php-* /^php[1-9]+/ + Pin: origin packages.sury.org + Pin-Priority: 300 {{ tests_dir }}/default/sury_php: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "Package: *" - - "Pin: origin packages.sury.org" - - "Pin-Priority: 200" + contents: | + Package: * + Pin: origin packages.sury.org + Pin-Priority: 200 # Default - Pattern syntax {{ tests_dir }}/default/ansible: exists: true @@ -50,50 +50,50 @@ file: owner: root group: root mode: "0644" - contains: - - "Package: ansible*" - - "Pin: origin ppa.launchpad.net" - - "Pin-Priority: 1000" + contents: | + Package: ansible* + Pin: origin ppa.launchpad.net + Pin-Priority: 1000 {{ tests_dir }}/default/ansible_foo: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "Package: ansible*" - - "Pin: origin ppa.launchpad.net" - - "Pin-Priority: 1000" + contents: | + Package: ansible* + Pin: origin ppa.launchpad.net + Pin-Priority: 1000 {{ tests_dir }}/default/ansible_bar: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "Package: foo bar" - - "Pin: origin ppa.launchpad.net" - - "Pin-Priority: 1000" + contents: | + Package: foo bar + Pin: origin ppa.launchpad.net + Pin-Priority: 1000 {{ tests_dir }}/default/ansible_baz: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "Package: ansible*" - - "Pin: baz" - - "Pin-Priority: 1000" + contents: | + Package: ansible* + Pin: baz + Pin-Priority: 1000 {{ tests_dir }}/default/ansible_qux: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "Package: ansible*" - - "Pin: origin ppa.launchpad.net" - - "Pin-Priority: 1234" + contents: | + Package: ansible* + Pin: origin ppa.launchpad.net + Pin-Priority: 1234 # Default - Verbose syntax {{ tests_dir }}/default/foo_foo: exists: true @@ -101,10 +101,10 @@ file: owner: root group: root mode: "0644" - contains: - - "Package: foo" - - "Pin: foo" - - "Pin-Priority: 100" + contents: | + Package: foo + Pin: foo + Pin-Priority: 100 # Default - Template {{ tests_dir }}/default/template: exists: true @@ -112,8 +112,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -121,10 +120,10 @@ file: owner: root group: root mode: "0644" - contains: - - "Package: foo" - - "Pin: foo" - - "Pin-Priority: 100" + contents: | + Package: foo + Pin: foo + Pin-Priority: 100 # Default - State {{ tests_dir }}/default/state_present_implicit: exists: true @@ -155,16 +154,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/apt/goss/repositories.default.yaml.j2 b/molecule/apt/goss/repositories.default.yaml.j2 index d085af74c..530622e36 100644 --- a/molecule/apt/goss/repositories.default.yaml.j2 +++ b/molecule/apt/goss/repositories.default.yaml.j2 @@ -8,8 +8,8 @@ file: owner: root group: root mode: "0644" - contains: - - "deb https://packages.sury.org/php/ {{ ansible_facts.distribution_release }} main" + contents: | + deb https://packages.sury.org/php/ {{ ansible_facts.distribution_release }} main # Short syntax /etc/apt/sources.list.d/debian_matomo_org.list: exists: true @@ -17,8 +17,8 @@ file: owner: root group: root mode: "0644" - contains: - - "deb http://debian.matomo.org/ piwik main" + contents: | + deb http://debian.matomo.org/ piwik main # Pattern syntax /etc/apt/sources.list.d/apt_grafana_com.list: exists: true @@ -26,8 +26,8 @@ file: owner: root group: root mode: "0644" - contains: - - "deb https://apt.grafana.com stable main" + contents: | + deb https://apt.grafana.com stable main # Verbose syntax /etc/apt/sources.list.d/dl_yarnpkg_com_debian.list: exists: true @@ -35,16 +35,16 @@ file: owner: root group: root mode: "0644" - contains: - - "deb https://dl.yarnpkg.com/debian/ stable main" + contents: | + deb https://dl.yarnpkg.com/debian/ stable main /etc/apt/sources.list.d/apt_postgresql_org_pub_repos_apt.list: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "deb http://apt.postgresql.org/pub/repos/apt/ {{ ansible_facts.distribution_release }}-pgdg main" + contents: | + deb http://apt.postgresql.org/pub/repos/apt/ {{ ansible_facts.distribution_release }}-pgdg main # Flatten /etc/apt/sources.list.d/nginx_org_packages_debian.list: exists: true @@ -52,8 +52,8 @@ file: owner: root group: root mode: "0644" - contains: - - "deb http://nginx.org/packages/debian/ {{ ansible_facts.distribution_release }} nginx" + contents: | + deb http://nginx.org/packages/debian/ {{ ansible_facts.distribution_release }} nginx # State /etc/apt/sources.list.d/deb_nodesource_com_node_12_x.list: exists: true @@ -61,8 +61,8 @@ file: owner: root group: root mode: "0644" - contains: - - "deb https://deb.nodesource.com/node_12.x {{ ansible_facts.distribution_release }} main" + contents: | + deb https://deb.nodesource.com/node_12.x {{ ansible_facts.distribution_release }} main /etc/apt/sources.list.d/deb_nodesource_com_node_14_x.list: exists: false /etc/apt/sources.list.d/deb_nodesource_com_node_16_x.list: @@ -71,15 +71,15 @@ file: owner: root group: root mode: "0644" - contains: - - "deb https://deb.nodesource.com/node_16.x {{ ansible_facts.distribution_release }} main" + contents: | + deb https://deb.nodesource.com/node_16.x {{ ansible_facts.distribution_release }} main /etc/apt/sources.list.d/deb_nodesource_com_node_18_x.list: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "deb https://deb.nodesource.com/node_18.x {{ ansible_facts.distribution_release }} main" + contents: | + deb https://deb.nodesource.com/node_18.x {{ ansible_facts.distribution_release }} main /etc/apt/sources.list.d/deb_nodesource_com_node_20_x.list: exists: false diff --git a/molecule/apt/goss/repositories.exclusive.yaml.j2 b/molecule/apt/goss/repositories.exclusive.yaml.j2 index 252a63bd2..b4ace9c8d 100644 --- a/molecule/apt/goss/repositories.exclusive.yaml.j2 +++ b/molecule/apt/goss/repositories.exclusive.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "deb https://deb.nodesource.com/node_14.x {{ ansible_facts.distribution_release }} main" + contents: | + deb https://deb.nodesource.com/node_14.x {{ ansible_facts.distribution_release }} main /etc/apt/sources.list.d/deb_nodesource_com_node_16_x.list: exists: false /etc/apt/sources.list.d/deb_nodesource_com_node_18_x.list: diff --git a/molecule/apt/goss/sources_list.yaml.j2 b/molecule/apt/goss/sources_list.yaml.j2 index 08d69cd5f..e71117af1 100644 --- a/molecule/apt/goss/sources_list.yaml.j2 +++ b/molecule/apt/goss/sources_list.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Template {{ tests_dir }}/template: exists: true @@ -18,5 +17,4 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/aptly/goss/config.yaml.j2 b/molecule/aptly/goss/config.yaml.j2 index 5c1031129..6644fafa8 100644 --- a/molecule/aptly/goss/config.yaml.j2 +++ b/molecule/aptly/goss/config.yaml.j2 @@ -7,26 +7,24 @@ file: owner: root group: root mode: "0644" - contains: - - '{' - - ' "architectures": [' - - ' "amd64"' - - ' ],' - - ' "rootDir": "/molecule/aptly"' - - '}' + contents: | + { + "architectures": [ + "amd64" + ], + "rootDir": "/molecule/aptly" + } {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/backup_manager/goss/configs.yaml.j2 b/molecule/backup_manager/goss/configs.yaml.j2 index 7ea9ff399..92c13aceb 100644 --- a/molecule/backup_manager/goss/configs.yaml.j2 +++ b/molecule/backup_manager/goss/configs.yaml.j2 @@ -9,17 +9,17 @@ file: owner: root group: root mode: "0600" - contains: - - export BM_REPOSITORY_ROOT="/srv/backup/mysql" - - export BM_TARBALL_DIRECTORIES="foo bar baz" - - BM_PIPE_COMMAND[0]="command0" - - BM_PIPE_NAME[0]="name0" - - BM_PIPE_FILETYPE[0]="filetype0" - - BM_PIPE_COMPRESS[0]="compress0" - - BM_PIPE_COMMAND[1]="command1" - - BM_PIPE_NAME[1]="name1" - - BM_PIPE_FILETYPE[1]="filetype1" - - BM_PIPE_COMPRESS[1]="compress1" + contents: | + export BM_REPOSITORY_ROOT="/srv/backup/mysql" + export BM_TARBALL_DIRECTORIES="foo bar baz" + BM_PIPE_COMMAND[0]="command0" + BM_PIPE_NAME[0]="name0" + BM_PIPE_FILETYPE[0]="filetype0" + BM_PIPE_COMPRESS[0]="compress0" + BM_PIPE_COMMAND[1]="command1" + BM_PIPE_NAME[1]="name1" + BM_PIPE_FILETYPE[1]="filetype1" + BM_PIPE_COMPRESS[1]="compress1" # Default - Content {{ tests_dir }}/default/content: exists: true @@ -27,8 +27,7 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -36,16 +35,14 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0600" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -83,24 +80,21 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0600" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0600" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/bind/goss/configs.yaml.j2 b/molecule/bind/goss/configs.yaml.j2 index e9c0a8e67..620c52193 100644 --- a/molecule/bind/goss/configs.yaml.j2 +++ b/molecule/bind/goss/configs.yaml.j2 @@ -7,16 +7,14 @@ file: owner: root group: bind mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/content: exists: true filetype: file owner: root group: bind mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/state_absent_existing: exists: false {{ tests_dir }}/omit: diff --git a/molecule/bind/goss/options.yaml.j2 b/molecule/bind/goss/options.yaml.j2 index d38c367e1..321b899e6 100644 --- a/molecule/bind/goss/options.yaml.j2 +++ b/molecule/bind/goss/options.yaml.j2 @@ -4,5 +4,5 @@ file: {{ tests_file }}: exists: true filetype: file - contains: - - OPTIONS="-u bind -4" + contents: | + OPTIONS="-u bind -4" diff --git a/molecule/bind/goss/zones.yaml.j2 b/molecule/bind/goss/zones.yaml.j2 index 9e49af10e..3446304ea 100644 --- a/molecule/bind/goss/zones.yaml.j2 +++ b/molecule/bind/goss/zones.yaml.j2 @@ -7,16 +7,14 @@ file: owner: bind group: bind mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/db.content: exists: true filetype: file owner: bind group: bind mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/db.state_absent_existing: exists: false {{ tests_dir }}/db.omit: @@ -27,9 +25,7 @@ file: owner: bind group: bind mode: "0644" - contains: - - "/^Dynamic$/" + contents: Dynamic {{ tests_dir }}/db.dynamic_existing: exists: true - contains: - - "!/^Dynamic existing$/" + contents: Dynamic existing diff --git a/molecule/cloud_init/goss/configs.yaml.j2 b/molecule/cloud_init/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/cloud_init/goss/configs.yaml.j2 +++ b/molecule/cloud_init/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/composer/goss/users_auth.yaml.j2 b/molecule/composer/goss/users_auth.yaml.j2 index d2c8e741d..d45b84435 100644 --- a/molecule/composer/goss/users_auth.yaml.j2 +++ b/molecule/composer/goss/users_auth.yaml.j2 @@ -11,15 +11,15 @@ file: filetype: file owner: root mode: "0644" - contains: - - '{' - - ' "github-oauth": {' - - ' "github.com": "9927d2878ffa105fc5236c762f2fd7zfd28b841d"' - - ' },' - - ' "http-basic": {' - - ' "repo.example1.org": {' - - ' "username": "my-username1"' - - ' "password": "my-secret-password1"' - - ' }' - - ' }' - - '}' + contents: | + { + "github-oauth": { + "github.com": "9927d2878ffa105fc5236c762f2fd7zfd28b841d" + }, + "http-basic": { + "repo.example1.org": { + "username": "my-username1" + "password": "my-secret-password1" + } + } + } diff --git a/molecule/cron/goss/files.yaml.j2 b/molecule/cron/goss/files.yaml.j2 index c630c8443..52f7356c1 100644 --- a/molecule/cron/goss/files.yaml.j2 +++ b/molecule/cron/goss/files.yaml.j2 @@ -9,12 +9,11 @@ file: owner: root group: root mode: "0644" - contains: - - 'FOO="bar"' - - "0 7 * * * bar cd /srv/app && bin/console app:bar:bar" - - "1 2 3 4 5 foo cd /srv/app && bin/console app:baz:baz" - - "* * * * * foo cd /srv/app && bin/console app:foo:present" - - "!* * * * * foo cd /srv/app && bin/console app:foo:absent" + contents: | + FOO="bar" + 0 7 * * * bar cd /srv/app && bin/console app:bar:bar + 1 2 3 4 5 foo cd /srv/app && bin/console app:baz:baz + * * * * * foo cd /srv/app && bin/console app:foo:present # Default - Content {{ tests_dir }}/default/content: exists: true @@ -22,8 +21,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -31,16 +29,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -78,24 +74,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Defaults - User {{ tests_dir }}/defaults/user: exists: true @@ -103,24 +96,24 @@ file: owner: root group: root mode: "0644" - contains: - - "* * * * * foo foo" + contents: | + * * * * * foo foo {{ tests_dir }}/defaults/user_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "* * * * * bar bar" + contents: | + * * * * * bar bar {{ tests_dir }}/defaults/user_job: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "* * * * * baz baz" + contents: | + * * * * * baz baz # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/dhcp/goss/default.yaml.j2 b/molecule/dhcp/goss/default.yaml.j2 index ea849fb1b..c05846aec 100644 --- a/molecule/dhcp/goss/default.yaml.j2 +++ b/molecule/dhcp/goss/default.yaml.j2 @@ -17,8 +17,8 @@ file: owner: root group: root mode: "0644" - contains: - - INTERFACESv4="{{ ansible_facts.default_ipv4.interface }}" + contents: | + INTERFACESv4="{{ ansible_facts.default_ipv4.interface }}" # Config {{ manala_dhcp_config_file }}: exists: true @@ -26,9 +26,9 @@ file: owner: root group: root mode: "0644" - contains: - - "subnet {{ ansible_facts.default_ipv4.network }} netmask {{ ansible_facts.default_ipv4.netmask }} {" - - "}" + contents: | + subnet {{ ansible_facts.default_ipv4.network }} netmask {{ ansible_facts.default_ipv4.netmask }} { + } command: # Interfaces diff --git a/molecule/dnsmasq/goss/configs.yaml.j2 b/molecule/dnsmasq/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/dnsmasq/goss/configs.yaml.j2 +++ b/molecule/dnsmasq/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/docker/goss/applications.yaml.j2 b/molecule/docker/goss/applications.yaml.j2 index 162088053..6964886cf 100644 --- a/molecule/docker/goss/applications.yaml.j2 +++ b/molecule/docker/goss/applications.yaml.j2 @@ -19,8 +19,7 @@ file: owner: root group: root mode: "0755" - contains: - - "/^Template$/" + contents: Template command: {{ tests_dir }}/hello-world: diff --git a/molecule/docker/goss/config_daemon.yaml.j2 b/molecule/docker/goss/config_daemon.yaml.j2 index 84378d500..788624ec6 100644 --- a/molecule/docker/goss/config_daemon.yaml.j2 +++ b/molecule/docker/goss/config_daemon.yaml.j2 @@ -7,24 +7,22 @@ file: owner: root group: root mode: "0644" - contains: - - "{" - - " \"experimental\": false," - - " \"storage-driver\": \"vfs\"" - - "}" + contents: | + { + "experimental": false, + "storage-driver": "vfs" + } {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/elasticsearch.7/goss/config.yaml.j2 b/molecule/elasticsearch.7/goss/config.yaml.j2 index 7cdbc3512..6dc07ca90 100644 --- a/molecule/elasticsearch.7/goss/config.yaml.j2 +++ b/molecule/elasticsearch.7/goss/config.yaml.j2 @@ -7,23 +7,21 @@ file: owner: root group: elasticsearch mode: "0660" - contains: - - "cluster:" - - " name: foo" - - "path.data: /foo/bar" + contents: | + cluster: + name: foo + path.data: /foo/bar {{ tests_dir }}/content: exists: true filetype: file owner: root group: elasticsearch mode: "0660" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: elasticsearch mode: "0660" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/elasticsearch.7/goss/environment.yaml.j2 b/molecule/elasticsearch.7/goss/environment.yaml.j2 index c71a90cad..5b7e5b51b 100644 --- a/molecule/elasticsearch.7/goss/environment.yaml.j2 +++ b/molecule/elasticsearch.7/goss/environment.yaml.j2 @@ -7,22 +7,20 @@ file: owner: root group: elasticsearch mode: "0660" - contains: - - "/^ES_JAVA_OPTS=\"-Xms1g -Xmx1g\"$/" - - "/^FOO=\"bar\"$/" + contents: | + ES_JAVA_OPTS="-Xms1g -Xmx1g" + FOO="bar" {{ tests_dir }}/content: exists: true filetype: file owner: root group: elasticsearch mode: "0660" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: elasticsearch mode: "0660" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/environment/goss/default.yaml.j2 b/molecule/environment/goss/default.yaml.j2 index 859cf1120..43896af80 100644 --- a/molecule/environment/goss/default.yaml.j2 +++ b/molecule/environment/goss/default.yaml.j2 @@ -4,28 +4,28 @@ file: /etc/environment: exists: true filetype: file - contains: - - '_FOO="bar"' - - '_BAR="123"' - - 'BAR="123"' - - 'BAZ="1.2"' - - 'FOO="bar"' - - 'QUX="foo=bar"' + contents: | + _FOO="bar" + _BAR="123" + BAR="123" + BAZ="1.2" + FOO="bar" + QUX="foo=bar" /etc/zsh/zshenv: exists: true filetype: file - contains: - - '# /etc/zsh/zshenv' - - 'export BAR="123"' - - 'export BAZ="1.2"' - - 'export FOO="bar"' - - 'export QUX="foo=bar"' + contents: | + # /etc/zsh/zshenv + export BAR="123" + export BAZ="1.2" + export FOO="bar" + export QUX="foo=bar" {{ tests_dir }}/file: exists: true filetype: file - contains: - - '# {{ tests_dir }}/file' - - 'export BAR="123"' - - 'export BAZ="1.2"' - - 'export FOO="bar"' - - 'export QUX="foo=bar"' + contents: | + # {{ tests_dir }}/file + export BAR="123" + export BAZ="1.2" + export FOO="bar" + export QUX="foo=bar" diff --git a/molecule/fail2ban/goss/config.yaml.j2 b/molecule/fail2ban/goss/config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/fail2ban/goss/config.yaml.j2 +++ b/molecule/fail2ban/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/files/goss/content.yaml.j2 b/molecule/files/goss/content.yaml.j2 index ed7c0d038..1671ed28c 100644 --- a/molecule/files/goss/content.yaml.j2 +++ b/molecule/files/goss/content.yaml.j2 @@ -5,13 +5,11 @@ file: {{ tests_dir }}/default/default: exists: true filetype: file - contains: - - Content default + contents: Content default {{ tests_dir }}/default/present: exists: true filetype: file - contains: - - Content present + contents: Content present {{ tests_dir }}/default/absent: exists: false {{ tests_dir }}/default/ignore: @@ -23,15 +21,13 @@ file: {{ tests_dir }}/parents/content: exists: true filetype: file - contains: - - Content parents default + contents: Content parents default {{ tests_dir }}/parents_defaults: exists: true filetype: directory {{ tests_dir }}/parents_defaults/content: exists: true filetype: file - contains: - - Content defaults parents + contents: Content defaults parents {{ tests_dir }}/parents_unexisting/content: exists: false diff --git a/molecule/files/goss/copy.yaml.j2 b/molecule/files/goss/copy.yaml.j2 index 909b30e3e..af2324490 100644 --- a/molecule/files/goss/copy.yaml.j2 +++ b/molecule/files/goss/copy.yaml.j2 @@ -5,13 +5,11 @@ file: {{ tests_dir }}/default/default: exists: true filetype: file - contains: - - "/^File$/" + contents: File {{ tests_dir }}/default/present: exists: true filetype: file - contains: - - "/^File$/" + contents: File {{ tests_dir }}/default/absent: exists: false {{ tests_dir }}/default/ignore: diff --git a/molecule/files/goss/template.yaml.j2 b/molecule/files/goss/template.yaml.j2 index d9653b8ab..ca6bd525c 100644 --- a/molecule/files/goss/template.yaml.j2 +++ b/molecule/files/goss/template.yaml.j2 @@ -5,13 +5,11 @@ file: {{ tests_dir }}/default/default: exists: true filetype: file - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/present: exists: true filetype: file - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/absent: exists: false {{ tests_dir }}/default/ignore: @@ -23,15 +21,13 @@ file: {{ tests_dir }}/parents/template: exists: true filetype: file - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/parents_defaults: exists: true filetype: directory {{ tests_dir }}/parents_defaults/template: exists: true filetype: file - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/parents_unexisting/template: exists: false diff --git a/molecule/files/goss/url.yaml.j2 b/molecule/files/goss/url.yaml.j2 index e75b26935..1af5388e7 100644 --- a/molecule/files/goss/url.yaml.j2 +++ b/molecule/files/goss/url.yaml.j2 @@ -5,7 +5,7 @@ file: {{ tests_dir }}/default/example: exists: true filetype: file - contains: + contents: - Example Domain - This domain is for use in illustrative examples in documents {{ tests_dir }}/default/alt-galaxy.tar.gz: diff --git a/molecule/git/goss/config.yaml.j2 b/molecule/git/goss/config.yaml.j2 index 81f375259..6452cc121 100644 --- a/molecule/git/goss/config.yaml.j2 +++ b/molecule/git/goss/config.yaml.j2 @@ -7,26 +7,24 @@ file: owner: root group: root mode: "0644" - contains: - - "[foo]" - - " foo = true" - - " bar = false" - - "[bar]" - - " foo = bar" - - " bar = 123" + contents: | + [foo] + foo = true + bar = false + [bar] + foo = bar + bar = 123 {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/gitlab/goss/configs.yaml.j2 b/molecule/gitlab/goss/configs.yaml.j2 index 6533cbc38..7f1c28297 100644 --- a/molecule/gitlab/goss/configs.yaml.j2 +++ b/molecule/gitlab/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0600" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0600" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0600" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/grafana/goss/config.yaml.j2 b/molecule/grafana/goss/config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/grafana/goss/config.yaml.j2 +++ b/molecule/grafana/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/grafana_agent/goss/config.yaml.j2 b/molecule/grafana_agent/goss/config.yaml.j2 index 016d4d833..11322b140 100644 --- a/molecule/grafana_agent/goss/config.yaml.j2 +++ b/molecule/grafana_agent/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: grafana-agent mode: "0640" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: grafana-agent mode: "0640" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/haproxy/goss/config.yaml.j2 b/molecule/haproxy/goss/config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/haproxy/goss/config.yaml.j2 +++ b/molecule/haproxy/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/haproxy/goss/configs.yaml.j2 b/molecule/haproxy/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/haproxy/goss/configs.yaml.j2 +++ b/molecule/haproxy/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/haproxy/goss/environment.yaml.j2 b/molecule/haproxy/goss/environment.yaml.j2 index c4231ad3c..290402b09 100644 --- a/molecule/haproxy/goss/environment.yaml.j2 +++ b/molecule/haproxy/goss/environment.yaml.j2 @@ -7,22 +7,20 @@ file: owner: root group: root mode: "0644" - contains: - - "/^CONFIG=\"/etc/haproxy/conf.d.test\"$/" - - "/^FOO=\"bar\"$/" + contents: | + CONFIG="/etc/haproxy/conf.d.test" + FOO="bar" {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/haproxy/goss/errorfiles.yaml.j2 b/molecule/haproxy/goss/errorfiles.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/haproxy/goss/errorfiles.yaml.j2 +++ b/molecule/haproxy/goss/errorfiles.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/influxdb/goss/config.yaml.j2 b/molecule/influxdb/goss/config.yaml.j2 index 322b324d8..8001f50c8 100644 --- a/molecule/influxdb/goss/config.yaml.j2 +++ b/molecule/influxdb/goss/config.yaml.j2 @@ -7,21 +7,19 @@ file: owner: root group: root mode: "0644" - contains: - - reporting-disabled = true + contents: | + reporting-disabled = true {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/keepalived/goss/config.yaml.j2 b/molecule/keepalived/goss/config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/keepalived/goss/config.yaml.j2 +++ b/molecule/keepalived/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/keepalived/goss/environment.yaml.j2 b/molecule/keepalived/goss/environment.yaml.j2 index c92bea693..600f04c30 100644 --- a/molecule/keepalived/goss/environment.yaml.j2 +++ b/molecule/keepalived/goss/environment.yaml.j2 @@ -7,22 +7,20 @@ file: owner: root group: root mode: "0644" - contains: - - "/^DAEMON_ARGS=\"--log-console --log-detail\"$/" - - "/^FOO=\"bar\"$/" + contents: | + DAEMON_ARGS="--log-console --log-detail" + FOO="bar" {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/logrotate/goss/configs.yaml.j2 b/molecule/logrotate/goss/configs.yaml.j2 index fec97ebbc..597cb022b 100644 --- a/molecule/logrotate/goss/configs.yaml.j2 +++ b/molecule/logrotate/goss/configs.yaml.j2 @@ -9,11 +9,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/var/log/foo/*.log {" - - " rotate 17" - - " weekly" - - "}" + contents: | + /var/log/foo/*.log { + rotate 17 + weekly + } # Default - Content {{ tests_dir }}/default/content: exists: true @@ -21,8 +21,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -30,16 +29,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -77,24 +74,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/maxscale.2.3/goss/default.yaml.j2 b/molecule/maxscale.2.3/goss/default.yaml.j2 index 6a946e287..7c73662b1 100644 --- a/molecule/maxscale.2.3/goss/default.yaml.j2 +++ b/molecule/maxscale.2.3/goss/default.yaml.j2 @@ -19,8 +19,8 @@ file: /var/lib/maxscale/passwd: exists: true filetype: file - contains: - - '[{"name": "admin", "account": "admin", "password": "$1$MXS$ZKZ/yMdf0ycX3d18iuS9U."}]' + contents: | + [{"name": "admin", "account": "admin", "password": "$1$MXS$ZKZ/yMdf0ycX3d18iuS9U."}] service: maxscale: diff --git a/molecule/maxscale.2.4/goss/default.yaml.j2 b/molecule/maxscale.2.4/goss/default.yaml.j2 index 936700264..941c9645c 100644 --- a/molecule/maxscale.2.4/goss/default.yaml.j2 +++ b/molecule/maxscale.2.4/goss/default.yaml.j2 @@ -19,8 +19,8 @@ file: /var/lib/maxscale/passwd: exists: true filetype: file - contains: - - '[{"name": "admin", "account": "admin", "password": "$6$MXS$RjtL0yWoXRIzkDGR6iwIAUHrQTWvqMizWYaGZKetqP2VDmWLgpgaT5YueeBoMKkoTMisvIy3sGEUMFa16UYDc."}]' + contents: | + [{"name": "admin", "account": "admin", "password": "$6$MXS$RjtL0yWoXRIzkDGR6iwIAUHrQTWvqMizWYaGZKetqP2VDmWLgpgaT5YueeBoMKkoTMisvIy3sGEUMFa16UYDc."}] service: maxscale: diff --git a/molecule/maxscale.2.5/goss/config.yaml.j2 b/molecule/maxscale.2.5/goss/config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/maxscale.2.5/goss/config.yaml.j2 +++ b/molecule/maxscale.2.5/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/maxscale.2.5/goss/configs.yaml.j2 b/molecule/maxscale.2.5/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/maxscale.2.5/goss/configs.yaml.j2 +++ b/molecule/maxscale.2.5/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/maxscale.2.5/goss/default.yaml.j2 b/molecule/maxscale.2.5/goss/default.yaml.j2 index a13163dd7..d7c47bdde 100644 --- a/molecule/maxscale.2.5/goss/default.yaml.j2 +++ b/molecule/maxscale.2.5/goss/default.yaml.j2 @@ -18,8 +18,8 @@ file: /var/lib/maxscale/passwd: exists: true filetype: file - contains: - - '[{"name": "admin", "account": "admin", "password": "$6$MXS$RjtL0yWoXRIzkDGR6iwIAUHrQTWvqMizWYaGZKetqP2VDmWLgpgaT5YueeBoMKkoTMisvIy3sGEUMFa16UYDc."}]' + contents: | + [{"name": "admin", "account": "admin", "password": "$6$MXS$RjtL0yWoXRIzkDGR6iwIAUHrQTWvqMizWYaGZKetqP2VDmWLgpgaT5YueeBoMKkoTMisvIy3sGEUMFa16UYDc."}] service: maxscale: diff --git a/molecule/maxscale.2.5/goss/users.yaml.j2 b/molecule/maxscale.2.5/goss/users.yaml.j2 index 46994d9fb..d2cd5e55f 100644 --- a/molecule/maxscale.2.5/goss/users.yaml.j2 +++ b/molecule/maxscale.2.5/goss/users.yaml.j2 @@ -7,8 +7,8 @@ file: owner: maxscale group: maxscale mode: "0600" - contains: - - '[{"account": "admin", "name": "foo", "password": "$1$MXS$ilOCSZPnjmHjTz6B96SiJ1"},{"account": "admin", "name": "bar", "password": "$1$MXS$M.YZOr2pNTgW87l7KQWLU/"}]' + contents: | + [{"account": "admin", "name": "foo", "password": "$1$MXS$ilOCSZPnjmHjTz6B96SiJ1"},{"account": "admin", "name": "bar", "password": "$1$MXS$M.YZOr2pNTgW87l7KQWLU/"}] {{ tests_dir }}/array_empty: exists: true filetype: file @@ -16,13 +16,12 @@ file: group: maxscale mode: "0600" size: 2 - contains: - - '[]' + contents: | + [] {{ tests_dir }}/template: exists: true filetype: file owner: maxscale group: maxscale mode: "0600" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/maxscale.23.02/goss/config.yaml.j2 b/molecule/maxscale.23.02/goss/config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/maxscale.23.02/goss/config.yaml.j2 +++ b/molecule/maxscale.23.02/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/maxscale.23.02/goss/configs.yaml.j2 b/molecule/maxscale.23.02/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/maxscale.23.02/goss/configs.yaml.j2 +++ b/molecule/maxscale.23.02/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/maxscale.23.02/goss/default.yaml.j2 b/molecule/maxscale.23.02/goss/default.yaml.j2 index 47ba661cb..c76f9a4f2 100644 --- a/molecule/maxscale.23.02/goss/default.yaml.j2 +++ b/molecule/maxscale.23.02/goss/default.yaml.j2 @@ -18,8 +18,8 @@ file: /var/lib/maxscale/passwd: exists: true filetype: file - contains: - - '[{"name":"admin","account":"admin","password":"$6$MXS$RjtL0yWoXRIzkDGR6iwIAUHrQTWvqMizWYaGZKetqP2VDmWLgpgaT5YueeBoMKkoTMisvIy3sGEUMFa16UYDc."}]' + contents: | + [{"name":"admin","account":"admin","password":"$6$MXS$RjtL0yWoXRIzkDGR6iwIAUHrQTWvqMizWYaGZKetqP2VDmWLgpgaT5YueeBoMKkoTMisvIy3sGEUMFa16UYDc."}] service: maxscale: diff --git a/molecule/maxscale.23.02/goss/users.yaml.j2 b/molecule/maxscale.23.02/goss/users.yaml.j2 index 46994d9fb..d2cd5e55f 100644 --- a/molecule/maxscale.23.02/goss/users.yaml.j2 +++ b/molecule/maxscale.23.02/goss/users.yaml.j2 @@ -7,8 +7,8 @@ file: owner: maxscale group: maxscale mode: "0600" - contains: - - '[{"account": "admin", "name": "foo", "password": "$1$MXS$ilOCSZPnjmHjTz6B96SiJ1"},{"account": "admin", "name": "bar", "password": "$1$MXS$M.YZOr2pNTgW87l7KQWLU/"}]' + contents: | + [{"account": "admin", "name": "foo", "password": "$1$MXS$ilOCSZPnjmHjTz6B96SiJ1"},{"account": "admin", "name": "bar", "password": "$1$MXS$M.YZOr2pNTgW87l7KQWLU/"}] {{ tests_dir }}/array_empty: exists: true filetype: file @@ -16,13 +16,12 @@ file: group: maxscale mode: "0600" size: 2 - contains: - - '[]' + contents: | + [] {{ tests_dir }}/template: exists: true filetype: file owner: maxscale group: maxscale mode: "0600" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/maxscale.6.1/goss/config.yaml.j2 b/molecule/maxscale.6.1/goss/config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/maxscale.6.1/goss/config.yaml.j2 +++ b/molecule/maxscale.6.1/goss/config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/maxscale.6.1/goss/configs.yaml.j2 b/molecule/maxscale.6.1/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/maxscale.6.1/goss/configs.yaml.j2 +++ b/molecule/maxscale.6.1/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/maxscale.6.1/goss/default.yaml.j2 b/molecule/maxscale.6.1/goss/default.yaml.j2 index 384fd92f5..2c5ffb640 100644 --- a/molecule/maxscale.6.1/goss/default.yaml.j2 +++ b/molecule/maxscale.6.1/goss/default.yaml.j2 @@ -18,8 +18,8 @@ file: /var/lib/maxscale/passwd: exists: true filetype: file - contains: - - '[{"name": "admin", "account": "admin", "password": "$6$MXS$RjtL0yWoXRIzkDGR6iwIAUHrQTWvqMizWYaGZKetqP2VDmWLgpgaT5YueeBoMKkoTMisvIy3sGEUMFa16UYDc."}]' + contents: | + [{"name": "admin", "account": "admin", "password": "$6$MXS$RjtL0yWoXRIzkDGR6iwIAUHrQTWvqMizWYaGZKetqP2VDmWLgpgaT5YueeBoMKkoTMisvIy3sGEUMFa16UYDc."}] service: maxscale: diff --git a/molecule/maxscale.6.1/goss/users.yaml.j2 b/molecule/maxscale.6.1/goss/users.yaml.j2 index 46994d9fb..d2cd5e55f 100644 --- a/molecule/maxscale.6.1/goss/users.yaml.j2 +++ b/molecule/maxscale.6.1/goss/users.yaml.j2 @@ -7,8 +7,8 @@ file: owner: maxscale group: maxscale mode: "0600" - contains: - - '[{"account": "admin", "name": "foo", "password": "$1$MXS$ilOCSZPnjmHjTz6B96SiJ1"},{"account": "admin", "name": "bar", "password": "$1$MXS$M.YZOr2pNTgW87l7KQWLU/"}]' + contents: | + [{"account": "admin", "name": "foo", "password": "$1$MXS$ilOCSZPnjmHjTz6B96SiJ1"},{"account": "admin", "name": "bar", "password": "$1$MXS$M.YZOr2pNTgW87l7KQWLU/"}] {{ tests_dir }}/array_empty: exists: true filetype: file @@ -16,13 +16,12 @@ file: group: maxscale mode: "0600" size: 2 - contains: - - '[]' + contents: | + [] {{ tests_dir }}/template: exists: true filetype: file owner: maxscale group: maxscale mode: "0600" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/mongodb.4.4/goss/config.yaml.j2 b/molecule/mongodb.4.4/goss/config.yaml.j2 index 47df035fa..002fe6eb8 100644 --- a/molecule/mongodb.4.4/goss/config.yaml.j2 +++ b/molecule/mongodb.4.4/goss/config.yaml.j2 @@ -7,22 +7,20 @@ file: owner: root group: root mode: "0644" - contains: - - "foo" - - " bar: baz" + contents: | + foo + bar: baz {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/motd/goss/scripts.yaml.j2 b/molecule/motd/goss/scripts.yaml.j2 index 52ff64324..2fb0089be 100644 --- a/molecule/motd/goss/scripts.yaml.j2 +++ b/molecule/motd/goss/scripts.yaml.j2 @@ -9,9 +9,9 @@ file: owner: root group: root mode: "0755" - contains: - - "#!/bin/sh" - - "printf \"I hope that someone gets my message in a bottle, yeah\\n\"" + contents: | + #!/bin/sh + printf "I hope that someone gets my message in a bottle, yeah\\n" # Default - Content {{ tests_dir }}/default/content: exists: true @@ -19,8 +19,7 @@ file: owner: root group: root mode: "0755" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -28,16 +27,14 @@ file: owner: root group: root mode: "0755" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0755" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -75,24 +72,21 @@ file: owner: root group: root mode: "0755" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0755" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0755" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/mysql.5.7/goss/config.yaml.j2 b/molecule/mysql.5.7/goss/config.yaml.j2 index 1b8446241..72720fc4b 100644 --- a/molecule/mysql.5.7/goss/config.yaml.j2 +++ b/molecule/mysql.5.7/goss/config.yaml.j2 @@ -7,23 +7,21 @@ file: owner: root group: root mode: "0644" - contains: - - "[mysqld]" - - "bind-address = 1.2.3.4" - - "pid-file = /var/run/mysqld/mysqld.pid" + contents: | + [mysqld] + bind-address = 1.2.3.4 + pid-file = /var/run/mysqld/mysqld.pid {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/mysql.5.7/goss/configs.yaml.j2 b/molecule/mysql.5.7/goss/configs.yaml.j2 index d1fd2a908..7448bd53d 100644 --- a/molecule/mysql.5.7/goss/configs.yaml.j2 +++ b/molecule/mysql.5.7/goss/configs.yaml.j2 @@ -9,12 +9,12 @@ file: owner: root group: root mode: "0644" - contains: - - "[mysqld]" - - "user = mysql" - - "query_cache_size = 0" - - "gtid_mode = ON" - - "enforce_gtid_consistency = OFF" + contents: | + [mysqld] + user = mysql + query_cache_size = 0 + gtid_mode = ON + enforce_gtid_consistency = OFF # Default - Content {{ tests_dir }}/default/content: exists: true @@ -22,8 +22,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -31,16 +30,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -78,24 +75,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/mysql.8.0/goss/config.yaml.j2 b/molecule/mysql.8.0/goss/config.yaml.j2 index 1b8446241..72720fc4b 100644 --- a/molecule/mysql.8.0/goss/config.yaml.j2 +++ b/molecule/mysql.8.0/goss/config.yaml.j2 @@ -7,23 +7,21 @@ file: owner: root group: root mode: "0644" - contains: - - "[mysqld]" - - "bind-address = 1.2.3.4" - - "pid-file = /var/run/mysqld/mysqld.pid" + contents: | + [mysqld] + bind-address = 1.2.3.4 + pid-file = /var/run/mysqld/mysqld.pid {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/mysql.8.0/goss/configs.yaml.j2 b/molecule/mysql.8.0/goss/configs.yaml.j2 index d1fd2a908..7448bd53d 100644 --- a/molecule/mysql.8.0/goss/configs.yaml.j2 +++ b/molecule/mysql.8.0/goss/configs.yaml.j2 @@ -9,12 +9,12 @@ file: owner: root group: root mode: "0644" - contains: - - "[mysqld]" - - "user = mysql" - - "query_cache_size = 0" - - "gtid_mode = ON" - - "enforce_gtid_consistency = OFF" + contents: | + [mysqld] + user = mysql + query_cache_size = 0 + gtid_mode = ON + enforce_gtid_consistency = OFF # Default - Content {{ tests_dir }}/default/content: exists: true @@ -22,8 +22,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -31,16 +30,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -78,24 +75,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/mysql.mariadb.10.11/goss/config.yaml.j2 b/molecule/mysql.mariadb.10.11/goss/config.yaml.j2 index 1b8446241..72720fc4b 100644 --- a/molecule/mysql.mariadb.10.11/goss/config.yaml.j2 +++ b/molecule/mysql.mariadb.10.11/goss/config.yaml.j2 @@ -7,23 +7,21 @@ file: owner: root group: root mode: "0644" - contains: - - "[mysqld]" - - "bind-address = 1.2.3.4" - - "pid-file = /var/run/mysqld/mysqld.pid" + contents: | + [mysqld] + bind-address = 1.2.3.4 + pid-file = /var/run/mysqld/mysqld.pid {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/mysql.mariadb.10.11/goss/configs.yaml.j2 b/molecule/mysql.mariadb.10.11/goss/configs.yaml.j2 index d1fd2a908..7448bd53d 100644 --- a/molecule/mysql.mariadb.10.11/goss/configs.yaml.j2 +++ b/molecule/mysql.mariadb.10.11/goss/configs.yaml.j2 @@ -9,12 +9,12 @@ file: owner: root group: root mode: "0644" - contains: - - "[mysqld]" - - "user = mysql" - - "query_cache_size = 0" - - "gtid_mode = ON" - - "enforce_gtid_consistency = OFF" + contents: | + [mysqld] + user = mysql + query_cache_size = 0 + gtid_mode = ON + enforce_gtid_consistency = OFF # Default - Content {{ tests_dir }}/default/content: exists: true @@ -22,8 +22,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -31,16 +30,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -78,24 +75,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/network/goss/hosts.yaml.j2 b/molecule/network/goss/hosts.yaml.j2 index 21f741833..03a7ee259 100644 --- a/molecule/network/goss/hosts.yaml.j2 +++ b/molecule/network/goss/hosts.yaml.j2 @@ -7,8 +7,8 @@ file: owner: root group: root mode: "0644" - contains: - - "1.1.1.111 foo.com" - - "1.1.1.222 bar.com" - - "1.1.1.2 baz.com" - - "1.1.1.333 qux.com" + contents: | + 1.1.1.111 foo.com + 1.1.1.222 bar.com + 1.1.1.2 baz.com + 1.1.1.333 qux.com diff --git a/molecule/network/goss/interfaces_config.yaml.j2 b/molecule/network/goss/interfaces_config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/network/goss/interfaces_config.yaml.j2 +++ b/molecule/network/goss/interfaces_config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/network/goss/interfaces_configs.yaml.j2 b/molecule/network/goss/interfaces_configs.yaml.j2 index e0c4c6978..1d86c5afe 100644 --- a/molecule/network/goss/interfaces_configs.yaml.j2 +++ b/molecule/network/goss/interfaces_configs.yaml.j2 @@ -8,8 +8,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -17,16 +16,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -64,24 +61,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/network/goss/netplan_configs.yaml.j2 b/molecule/network/goss/netplan_configs.yaml.j2 index f6862c42a..da1ef51ac 100644 --- a/molecule/network/goss/netplan_configs.yaml.j2 +++ b/molecule/network/goss/netplan_configs.yaml.j2 @@ -12,8 +12,7 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -21,13 +20,11 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0600" - contains: - - "/^Template file$/" + contents: Template file diff --git a/molecule/network/goss/resolver_config.yaml.j2 b/molecule/network/goss/resolver_config.yaml.j2 index 30ac39316..59bc12f48 100644 --- a/molecule/network/goss/resolver_config.yaml.j2 +++ b/molecule/network/goss/resolver_config.yaml.j2 @@ -7,13 +7,11 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/network/goss/routing_tables.yaml.j2 b/molecule/network/goss/routing_tables.yaml.j2 index 984c8bc52..9a0b5a2f8 100644 --- a/molecule/network/goss/routing_tables.yaml.j2 +++ b/molecule/network/goss/routing_tables.yaml.j2 @@ -7,9 +7,9 @@ file: owner: root group: root mode: "0644" - contains: - - "255 local" - - "254 main" - - "253 default" - - "25 foo" - - "123 bar" + contents: | + 255 local + 254 main + 253 default + 25 foo + 123 bar diff --git a/molecule/nginx/goss/config.yaml.j2 b/molecule/nginx/goss/config.yaml.j2 index 1a9847208..9d80ec1c5 100644 --- a/molecule/nginx/goss/config.yaml.j2 +++ b/molecule/nginx/goss/config.yaml.j2 @@ -7,27 +7,25 @@ file: owner: root group: root mode: "0644" - contains: - - _true on; - - _false off; - - _array foo; - - _array bar; - - _string string; - - _integer 123; - - _float 4.56; + contents: | + _true on; + _false off; + _array foo; + _array bar; + _string string; + _integer 123; + _float 4.56; {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/nginx/goss/configs.yaml.j2 b/molecule/nginx/goss/configs.yaml.j2 index b1c846f53..f8a403565 100644 --- a/molecule/nginx/goss/configs.yaml.j2 +++ b/molecule/nginx/goss/configs.yaml.j2 @@ -9,14 +9,14 @@ file: owner: root group: root mode: "0644" - contains: - - _true on; - - _false off; - - _array foo; - - _array bar; - - _string string; - - _integer 123; - - _float 4.56; + contents: | + _true on; + _false off; + _array foo; + _array bar; + _string string; + _integer 123; + _float 4.56; # Default - Content {{ tests_dir }}/default/content: exists: true @@ -24,8 +24,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -33,16 +32,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -80,24 +77,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/ngrok/goss/configs.yaml.j2 b/molecule/ngrok/goss/configs.yaml.j2 index 3b01474d3..36ccac6cc 100644 --- a/molecule/ngrok/goss/configs.yaml.j2 +++ b/molecule/ngrok/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - 'web_addr: 1.2.3.4:1234' + contents: | + web_addr: 1.2.3.4:1234 # Default - Content {{ tests_dir }}/default/content: exists: true @@ -18,8 +18,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -27,16 +26,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -74,24 +71,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/ohmyzsh/goss/custom_themes.yaml.j2 b/molecule/ohmyzsh/goss/custom_themes.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/ohmyzsh/goss/custom_themes.yaml.j2 +++ b/molecule/ohmyzsh/goss/custom_themes.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/ohmyzsh/goss/users.yaml.j2 b/molecule/ohmyzsh/goss/users.yaml.j2 index 1574084fa..eba6fd2b9 100644 --- a/molecule/ohmyzsh/goss/users.yaml.j2 +++ b/molecule/ohmyzsh/goss/users.yaml.j2 @@ -9,13 +9,13 @@ file: owner: user_dict group: user_dict mode: "0644" - contains: - - 'foo=""' - - 'bar="true"' - - 'baz="false"' - - 'qux="foo"' - - 'quux=123' - - 'corge=(foo bar baz)' + contents: | + foo="" + bar="true" + baz="false" + qux="foo" + quux=123 + corge=(foo bar baz) # Content {{ tests_dir }}/content/.zshrc: exists: true @@ -23,8 +23,7 @@ file: owner: user_content group: user_content mode: "0644" - contains: - - "/^Content$/" + contents: Content # Template {{ tests_dir }}/template/.zshrc: exists: true @@ -32,8 +31,7 @@ file: owner: user_template group: user_template mode: "0644" - contains: - - "/^Template$/" + contents: Template # Flatten {{ tests_dir }}/flatten/.zshrc: exists: true diff --git a/molecule/pam_ssh_agent_auth/goss/default.yaml.j2 b/molecule/pam_ssh_agent_auth/goss/default.yaml.j2 index ba7d1e47d..1e9427044 100644 --- a/molecule/pam_ssh_agent_auth/goss/default.yaml.j2 +++ b/molecule/pam_ssh_agent_auth/goss/default.yaml.j2 @@ -11,10 +11,10 @@ file: owner: root group: root mode: "0440" - contains: - - "Defaults env_keep += SSH_AUTH_SOCK" + contents: | + Defaults env_keep += SSH_AUTH_SOCK /etc/pam.d/sudo: exists: true filetype: file - contains: - - "auth sufficient pam_ssh_agent_auth.so file=%h/.ssh/authorized_keys" + contents: | + auth sufficient pam_ssh_agent_auth.so file=%h/.ssh/authorized_keys diff --git a/molecule/php.5.6/goss/configs.yaml.j2 b/molecule/php.5.6/goss/configs.yaml.j2 index e81a008d7..20aab5847 100644 --- a/molecule/php.5.6/goss/configs.yaml.j2 +++ b/molecule/php.5.6/goss/configs.yaml.j2 @@ -8,32 +8,32 @@ file: owner: root group: root mode: "0644" - contains: - - "memory_limit = 123M" + contents: | + memory_limit = 123M {{ tests_dir }}/default/cli/conf.d/dict_cli: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 255M" + contents: | + memory_limit = 255M {{ tests_dir }}/default/fpm/conf.d/dict: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 123M" + contents: | + memory_limit = 123M {{ tests_dir }}/default/fpm/conf.d/dict_fpm: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 257M" + contents: | + memory_limit = 257M # Default - Content {{ tests_dir }}/default/cli/conf.d/content: exists: true @@ -41,16 +41,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/default/fpm/conf.d/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/cli/conf.d/template: exists: true @@ -58,32 +56,28 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/fpm/conf.d/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/cli/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/default/fpm/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/cli/conf.d/flatten: exists: true @@ -148,64 +142,56 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/cli/conf.d/template_cli: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/fpm/conf.d/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/fpm/conf.d/template_fpm: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/cli/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/fpm/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/cli/conf.d/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/fpm/conf.d/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/cli/conf.d/existing: diff --git a/molecule/php.5.6/goss/fpm_pools.yaml.j2 b/molecule/php.5.6/goss/fpm_pools.yaml.j2 index 574c84fff..1b8e4d9d5 100644 --- a/molecule/php.5.6/goss/fpm_pools.yaml.j2 +++ b/molecule/php.5.6/goss/fpm_pools.yaml.j2 @@ -9,21 +9,21 @@ file: owner: root group: root mode: "0644" - contains: - - "[www]" - - "user = foo" - - "group = foo" - - "env[BAR] = 123" - - "env[BAZ] = 1.2" - - "env[FOO] = bar" - - "env[QUX] = foo=bar" - - "php_admin_value[memory_limit] = 123M" - - "php_value[display_errors] = no" - - "include = /include-1" - - "include = /include-2" - - "[bar]" - - "user = bar" - - "group = bar" + contents: | + [www] + user = foo + group = foo + env[BAR] = 123 + env[BAZ] = 1.2 + env[FOO] = bar + env[QUX] = foo=bar + php_admin_value[memory_limit] = 123M + php_value[display_errors] = no + include = /include-1 + include = /include-2 + [bar] + user = bar + group = bar # Default - Content {{ tests_dir }}/default/content: exists: true @@ -31,8 +31,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -40,16 +39,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -87,24 +84,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/php.7.4/goss/configs.yaml.j2 b/molecule/php.7.4/goss/configs.yaml.j2 index e81a008d7..20aab5847 100644 --- a/molecule/php.7.4/goss/configs.yaml.j2 +++ b/molecule/php.7.4/goss/configs.yaml.j2 @@ -8,32 +8,32 @@ file: owner: root group: root mode: "0644" - contains: - - "memory_limit = 123M" + contents: | + memory_limit = 123M {{ tests_dir }}/default/cli/conf.d/dict_cli: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 255M" + contents: | + memory_limit = 255M {{ tests_dir }}/default/fpm/conf.d/dict: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 123M" + contents: | + memory_limit = 123M {{ tests_dir }}/default/fpm/conf.d/dict_fpm: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 257M" + contents: | + memory_limit = 257M # Default - Content {{ tests_dir }}/default/cli/conf.d/content: exists: true @@ -41,16 +41,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/default/fpm/conf.d/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/cli/conf.d/template: exists: true @@ -58,32 +56,28 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/fpm/conf.d/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/cli/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/default/fpm/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/cli/conf.d/flatten: exists: true @@ -148,64 +142,56 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/cli/conf.d/template_cli: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/fpm/conf.d/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/fpm/conf.d/template_fpm: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/cli/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/fpm/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/cli/conf.d/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/fpm/conf.d/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/cli/conf.d/existing: diff --git a/molecule/php.7.4/goss/fpm_pools.yaml.j2 b/molecule/php.7.4/goss/fpm_pools.yaml.j2 index 574c84fff..1b8e4d9d5 100644 --- a/molecule/php.7.4/goss/fpm_pools.yaml.j2 +++ b/molecule/php.7.4/goss/fpm_pools.yaml.j2 @@ -9,21 +9,21 @@ file: owner: root group: root mode: "0644" - contains: - - "[www]" - - "user = foo" - - "group = foo" - - "env[BAR] = 123" - - "env[BAZ] = 1.2" - - "env[FOO] = bar" - - "env[QUX] = foo=bar" - - "php_admin_value[memory_limit] = 123M" - - "php_value[display_errors] = no" - - "include = /include-1" - - "include = /include-2" - - "[bar]" - - "user = bar" - - "group = bar" + contents: | + [www] + user = foo + group = foo + env[BAR] = 123 + env[BAZ] = 1.2 + env[FOO] = bar + env[QUX] = foo=bar + php_admin_value[memory_limit] = 123M + php_value[display_errors] = no + include = /include-1 + include = /include-2 + [bar] + user = bar + group = bar # Default - Content {{ tests_dir }}/default/content: exists: true @@ -31,8 +31,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -40,16 +39,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -87,24 +84,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/php.8.2/goss/configs.yaml.j2 b/molecule/php.8.2/goss/configs.yaml.j2 index e81a008d7..20aab5847 100644 --- a/molecule/php.8.2/goss/configs.yaml.j2 +++ b/molecule/php.8.2/goss/configs.yaml.j2 @@ -8,32 +8,32 @@ file: owner: root group: root mode: "0644" - contains: - - "memory_limit = 123M" + contents: | + memory_limit = 123M {{ tests_dir }}/default/cli/conf.d/dict_cli: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 255M" + contents: | + memory_limit = 255M {{ tests_dir }}/default/fpm/conf.d/dict: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 123M" + contents: | + memory_limit = 123M {{ tests_dir }}/default/fpm/conf.d/dict_fpm: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "memory_limit = 257M" + contents: | + memory_limit = 257M # Default - Content {{ tests_dir }}/default/cli/conf.d/content: exists: true @@ -41,16 +41,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/default/fpm/conf.d/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/cli/conf.d/template: exists: true @@ -58,32 +56,28 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/fpm/conf.d/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/cli/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/default/fpm/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/cli/conf.d/flatten: exists: true @@ -148,64 +142,56 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/cli/conf.d/template_cli: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/fpm/conf.d/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/fpm/conf.d/template_fpm: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/cli/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/fpm/conf.d/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/cli/conf.d/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/fpm/conf.d/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/cli/conf.d/existing: diff --git a/molecule/php.8.2/goss/fpm_pools.yaml.j2 b/molecule/php.8.2/goss/fpm_pools.yaml.j2 index fb3e84b5f..b3d9b7a7d 100644 --- a/molecule/php.8.2/goss/fpm_pools.yaml.j2 +++ b/molecule/php.8.2/goss/fpm_pools.yaml.j2 @@ -9,23 +9,23 @@ file: owner: root group: root mode: "0644" - contains: - - "[www]" - - "user = foo" - - "group = foo" - - "env[BAR] = 123" - - "env[BAZ] = 1.2" - - "env[FOO] = bar" - - "env[QUX] = foo=bar" - - "php_admin_value[memory_limit] = 123M" - - "php_value[display_errors] = no" - - "include = /include-1" - - "include = /include-2" - - "access.suppress_path[] = /access.suppress_path-1" - - "access.suppress_path[] = /access.suppress_path-2" - - "[bar]" - - "user = bar" - - "group = bar" + contents: | + [www] + user = foo + group = foo + env[BAR] = 123 + env[BAZ] = 1.2 + env[FOO] = bar + env[QUX] = foo=bar + php_admin_value[memory_limit] = 123M + php_value[display_errors] = no + include = /include-1 + include = /include-2 + access.suppress_path[] = /access.suppress_path-1 + access.suppress_path[] = /access.suppress_path-2 + [bar] + user = bar + group = bar # Default - Content {{ tests_dir }}/default/content: exists: true @@ -33,8 +33,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -42,16 +41,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -89,24 +86,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/postgresql.9.4/goss/config.yaml.j2 b/molecule/postgresql.9.4/goss/config.yaml.j2 index d08d12108..a5a545d07 100644 --- a/molecule/postgresql.9.4/goss/config.yaml.j2 +++ b/molecule/postgresql.9.4/goss/config.yaml.j2 @@ -7,29 +7,25 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/content_hba: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/template_hba: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/proftpd/goss/configs.yaml.j2 b/molecule/proftpd/goss/configs.yaml.j2 index 2205e37c8..ab40b5c73 100644 --- a/molecule/proftpd/goss/configs.yaml.j2 +++ b/molecule/proftpd/goss/configs.yaml.j2 @@ -8,9 +8,9 @@ file: owner: root group: root mode: "0644" - contains: - - ServerName Manala ProFTPD Server - - DefaultRoot ~ + contents: | + ServerName Manala ProFTPD Server + DefaultRoot ~ # Default - Content {{ tests_dir }}/default/content: exists: true @@ -18,8 +18,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -27,16 +26,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -74,24 +71,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/proftpd/goss/users.yaml.j2 b/molecule/proftpd/goss/users.yaml.j2 index f19f083bf..41b5bb2bf 100644 --- a/molecule/proftpd/goss/users.yaml.j2 +++ b/molecule/proftpd/goss/users.yaml.j2 @@ -7,9 +7,9 @@ file: owner: root group: root mode: "0600" - contains: - - "user-1:$1$Z4eVi1jp$IQJdkHh28GGFbq9oSQR/b0:108:100::{{ tests_dir }}/user1:/bin/false" - - "user-2:$1$Z4eVi1jp$o4qLQc670sqyO2CKWzYBm1:0:0::{{ tests_dir }}/user2:/bin/false" + contents: | + user-1:$1$Z4eVi1jp$IQJdkHh28GGFbq9oSQR/b0:108:100::{{ tests_dir }}/user1:/bin/false + user-2:$1$Z4eVi1jp$o4qLQc670sqyO2CKWzYBm1:0:0::{{ tests_dir }}/user2:/bin/false {{ tests_dir }}/user1: exists: true filetype: directory diff --git a/molecule/prometheus/goss/default.yaml.j2 b/molecule/prometheus/goss/default.yaml.j2 index 770379502..5903ecbaa 100644 --- a/molecule/prometheus/goss/default.yaml.j2 +++ b/molecule/prometheus/goss/default.yaml.j2 @@ -56,18 +56,18 @@ file: owner: root group: root mode: "0644" - contains: - - "[Unit]" - - "Description=Prometheus" + contents: | + [Unit] + Description=Prometheus {{ manala_prometheus_node_exporter_service_file }}: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "[Unit]" - - "Description=Prometheus Node Exporter" + contents: | + [Unit] + Description=Prometheus Node Exporter command: # Install diff --git a/molecule/promtail/goss/default.yaml.j2 b/molecule/promtail/goss/default.yaml.j2 index 98b06e0db..08d44bed6 100644 --- a/molecule/promtail/goss/default.yaml.j2 +++ b/molecule/promtail/goss/default.yaml.j2 @@ -49,9 +49,9 @@ file: owner: root group: root mode: "0644" - contains: - - "[Unit]" - - "Description=Promtail" + contents: | + [Unit] + Description=Promtail command: # Install diff --git a/molecule/redis.6.0/goss/config.yaml.j2 b/molecule/redis.6.0/goss/config.yaml.j2 index f727f9bbe..79c8fa10f 100644 --- a/molecule/redis.6.0/goss/config.yaml.j2 +++ b/molecule/redis.6.0/goss/config.yaml.j2 @@ -7,29 +7,27 @@ file: owner: redis group: redis mode: "0640" - contains: - - "include /foo/bar.conf" - - "include /foo/baz.conf" - - "port 1234" + contents: | + include /foo/bar.conf + include /foo/baz.conf + port 1234 {{ tests_dir }}/dict-sentinel: exists: true filetype: file - contains: - - "sentinel monitor foo 1.2.3.4 6379 2" - - "sentinel down-after-milliseconds foo 1234" + contents: | + sentinel monitor foo 1.2.3.4 6379 2 + sentinel down-after-milliseconds foo 1234 {{ tests_dir }}/content-server: exists: true filetype: file owner: redis group: redis mode: "0640" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template-server: exists: true filetype: file owner: redis group: redis mode: "0640" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/redis.7.0/goss/config.yaml.j2 b/molecule/redis.7.0/goss/config.yaml.j2 index f727f9bbe..79c8fa10f 100644 --- a/molecule/redis.7.0/goss/config.yaml.j2 +++ b/molecule/redis.7.0/goss/config.yaml.j2 @@ -7,29 +7,27 @@ file: owner: redis group: redis mode: "0640" - contains: - - "include /foo/bar.conf" - - "include /foo/baz.conf" - - "port 1234" + contents: | + include /foo/bar.conf + include /foo/baz.conf + port 1234 {{ tests_dir }}/dict-sentinel: exists: true filetype: file - contains: - - "sentinel monitor foo 1.2.3.4 6379 2" - - "sentinel down-after-milliseconds foo 1234" + contents: | + sentinel monitor foo 1.2.3.4 6379 2 + sentinel down-after-milliseconds foo 1234 {{ tests_dir }}/content-server: exists: true filetype: file owner: redis group: redis mode: "0640" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template-server: exists: true filetype: file owner: redis group: redis mode: "0640" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/rsyslog/goss/config.yaml.j2 b/molecule/rsyslog/goss/config.yaml.j2 index 59e8bd071..ac0afee61 100644 --- a/molecule/rsyslog/goss/config.yaml.j2 +++ b/molecule/rsyslog/goss/config.yaml.j2 @@ -7,22 +7,20 @@ file: owner: root group: root mode: "0644" - contains: - - #$ModLoad imklog - - $FileOwner foo + contents: | + #$ModLoad imklog + $FileOwner foo {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/rsyslog/goss/configs.yaml.j2 b/molecule/rsyslog/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/rsyslog/goss/configs.yaml.j2 +++ b/molecule/rsyslog/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/sensu_go/goss/config.yaml.j2 b/molecule/sensu_go/goss/config.yaml.j2 index 201f98fe5..3f050266f 100644 --- a/molecule/sensu_go/goss/config.yaml.j2 +++ b/molecule/sensu_go/goss/config.yaml.j2 @@ -7,9 +7,9 @@ file: owner: sensu group: sensu mode: "0640" - contains: - - "backend-url:" - - "ws://127.0.0.1:8081" + contents: | + backend-url: + ws://127.0.0.1:8081 "{{ tests_dir }}/dict-backend": exists: true @@ -17,5 +17,5 @@ file: owner: sensu group: sensu mode: "0640" - contains: - - "state-dir: /tmp" + contents: | + state-dir: /tmp diff --git a/molecule/shorewall/goss/config.yaml.j2 b/molecule/shorewall/goss/config.yaml.j2 index 67d2e5735..7acb89d2d 100644 --- a/molecule/shorewall/goss/config.yaml.j2 +++ b/molecule/shorewall/goss/config.yaml.j2 @@ -7,7 +7,7 @@ file: owner: root group: root mode: "0644" - contains: - - LOG_MARTIANS=No - - IP_FORWARDING=On - - MULTICAST=Yes + contents: | + LOG_MARTIANS=No + IP_FORWARDING=On + MULTICAST=Yes diff --git a/molecule/shorewall/goss/configs.yaml.j2 b/molecule/shorewall/goss/configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/shorewall/goss/configs.yaml.j2 +++ b/molecule/shorewall/goss/configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/ssh/goss/config.yaml.j2 b/molecule/ssh/goss/config.yaml.j2 index 24d643a55..44b10b019 100644 --- a/molecule/ssh/goss/config.yaml.j2 +++ b/molecule/ssh/goss/config.yaml.j2 @@ -13,55 +13,51 @@ file: owner: root group: root mode: "0644" - contains: - - "foo none" - - "bar yes" - - "baz no" - - "qux foo" - - "quux 123" - - "corge foo" - - "corge bar" - - "corge baz" - - "grault" - - " foo bar" - - " bar 123" + contents: | + foo none + bar yes + baz no + qux foo + quux 123 + corge foo + corge bar + corge baz + grault + foo bar + bar 123 {{ tests_dir }}/dict-client: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "foo bar" + contents: | + foo bar {{ tests_dir }}/content-server: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/content-client: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template-server: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/template-client: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/ssh/goss/default.yaml.j2 b/molecule/ssh/goss/default.yaml.j2 index d71780fa1..d63806687 100644 --- a/molecule/ssh/goss/default.yaml.j2 +++ b/molecule/ssh/goss/default.yaml.j2 @@ -14,5 +14,5 @@ service: file: /etc/ssh/ssh_known_hosts: exists: true - contains: - - github.com ecdsa-sha2-nistp256 + contents: | + github.com ecdsa-sha2-nistp256 diff --git a/molecule/sudo/goss/sudoers.yaml.j2 b/molecule/sudo/goss/sudoers.yaml.j2 index bb2affab5..effaeafdd 100644 --- a/molecule/sudo/goss/sudoers.yaml.j2 +++ b/molecule/sudo/goss/sudoers.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0440" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0440" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0440" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0440" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0440" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0440" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/supervisor/goss/config.yaml.j2 b/molecule/supervisor/goss/config.yaml.j2 index ea4c41be6..d531f4036 100644 --- a/molecule/supervisor/goss/config.yaml.j2 +++ b/molecule/supervisor/goss/config.yaml.j2 @@ -7,26 +7,24 @@ file: owner: root group: root mode: "0644" - contains: - - "[unix_http_server]" - - "file=/tmp/supervisor.sock" - - "chmod=0700" - - "chown=nobody:nogroup" - - "[supervisord]" - - "logfile=/var/log/supervisord.log" + contents: | + [unix_http_server] + file=/tmp/supervisor.sock + chmod=0700 + chown=nobody:nogroup + [supervisord] + logfile=/var/log/supervisord.log {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/supervisor/goss/configs.yaml.j2 b/molecule/supervisor/goss/configs.yaml.j2 index c9eaf1f64..202f5cf4d 100644 --- a/molecule/supervisor/goss/configs.yaml.j2 +++ b/molecule/supervisor/goss/configs.yaml.j2 @@ -9,13 +9,13 @@ file: owner: root group: root mode: "0644" - contains: - - "[unix_http_server]" - - "file=/tmp/supervisor.sock" - - "chmod=0700" - - "chown=nobody:nogroup" - - "[supervisord]" - - "logfile=/var/log/supervisord.log" + contents: | + [unix_http_server] + file=/tmp/supervisor.sock + chmod=0700 + chown=nobody:nogroup + [supervisord] + logfile=/var/log/supervisord.log # Default - Content {{ tests_dir }}/default/content: exists: true @@ -23,8 +23,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -32,16 +31,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -79,24 +76,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/systemd/goss/system_configs.yaml.j2 b/molecule/systemd/goss/system_configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/systemd/goss/system_configs.yaml.j2 +++ b/molecule/systemd/goss/system_configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/systemd/goss/tmpfiles_configs.yaml.j2 b/molecule/systemd/goss/tmpfiles_configs.yaml.j2 index ff0e5852f..ec74618af 100644 --- a/molecule/systemd/goss/tmpfiles_configs.yaml.j2 +++ b/molecule/systemd/goss/tmpfiles_configs.yaml.j2 @@ -9,8 +9,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +17,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -65,24 +62,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/telegraf/goss/config.yaml.j2 b/molecule/telegraf/goss/config.yaml.j2 index a915ecf37..f6f2159ea 100644 --- a/molecule/telegraf/goss/config.yaml.j2 +++ b/molecule/telegraf/goss/config.yaml.j2 @@ -7,26 +7,24 @@ file: owner: root group: root mode: "0644" - contains: - - "[global_tags]" - - 'foo = "bar"' - - "[agent]" - - 'hostname = "test.manala.dev"' - - "quiet = true" - - "metric_batch_size = 1234" + contents: | + [global_tags] + foo = "bar" + [agent] + hostname = "test.manala.dev" + quiet = true + metric_batch_size = 1234 {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template diff --git a/molecule/telegraf/goss/configs.yaml.j2 b/molecule/telegraf/goss/configs.yaml.j2 index e87537290..d2cba6e3d 100644 --- a/molecule/telegraf/goss/configs.yaml.j2 +++ b/molecule/telegraf/goss/configs.yaml.j2 @@ -9,13 +9,13 @@ file: owner: root group: root mode: "0644" - contains: - - "[global_tags]" - - 'foo = "bar"' - - "[agent]" - - 'hostname = "test.manala.dev"' - - "quiet = true" - - "metric_batch_size = 1234" + contents: | + [global_tags] + foo = "bar" + [agent] + hostname = "test.manala.dev" + quiet = true + metric_batch_size = 1234 # Default - Content {{ tests_dir }}/default/content: exists: true @@ -23,8 +23,7 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -32,16 +31,14 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/default/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -79,24 +76,21 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template {{ tests_dir }}/defaults/template_file: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file {{ tests_dir }}/defaults/template_overwrite: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template file$/" + contents: Template file # Exclusive {{ tests_dir }}/exclusive/existing: diff --git a/molecule/timezone/goss/default.yaml.j2 b/molecule/timezone/goss/default.yaml.j2 index 7c8ade0de..137b5df0c 100644 --- a/molecule/timezone/goss/default.yaml.j2 +++ b/molecule/timezone/goss/default.yaml.j2 @@ -7,5 +7,5 @@ file: owner: root group: root mode: "0644" - contains: - - Africa/Bamako + contents: | + Africa/Bamako diff --git a/molecule/vim/goss/config.yaml.j2 b/molecule/vim/goss/config.yaml.j2 index ff5b14e9d..74cfb9b98 100644 --- a/molecule/vim/goss/config.yaml.j2 +++ b/molecule/vim/goss/config.yaml.j2 @@ -7,22 +7,20 @@ file: owner: root group: root mode: "0644" - contains: - - set encoding=utf8 - - set expandtab + contents: | + set encoding=utf8 + set expandtab {{ tests_dir }}/content: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: Content {{ tests_dir }}/template: exists: true filetype: file owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: Template