From 189553b619e1c0110c622ca79063dc63f23b70d3 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 | 8 +- molecule/ansible/goss/group_vars.yaml.j2 | 24 ++--- molecule/ansible/goss/host_vars.yaml.j2 | 24 ++--- molecule/ansible/goss/hosts.yaml.j2 | 8 +- molecule/apparmor/goss/configs.yaml.j2 | 24 ++--- molecule/apt/goss/configs.yaml.j2 | 24 ++--- molecule/apt/goss/keys.yaml.j2 | 16 +-- molecule/apt/goss/preferences.yaml.j2 | 100 +++++++++--------- .../apt/goss/repositories.default.yaml.j2 | 36 +++---- .../apt/goss/repositories.exclusive.yaml.j2 | 4 +- molecule/apt/goss/sources_list.yaml.j2 | 8 +- molecule/aptly/goss/config.yaml.j2 | 22 ++-- molecule/aptly/goss/repositories.yaml.j2 | 24 ++--- molecule/backup_manager/goss/configs.yaml.j2 | 46 ++++---- molecule/bind/goss/configs.yaml.j2 | 8 +- molecule/bind/goss/options.yaml.j2 | 4 +- molecule/bind/goss/zones.yaml.j2 | 15 ++- molecule/cloud_init/goss/configs.yaml.j2 | 24 ++--- molecule/composer/goss/users_auth.yaml.j2 | 24 ++--- molecule/cron/goss/files.yaml.j2 | 47 ++++---- molecule/deploy/goss/clean.yaml.j2 | 4 +- molecule/dhcp/goss/default.yaml.j2 | 8 +- molecule/dnsmasq/goss/configs.yaml.j2 | 24 ++--- molecule/docker/goss/applications.yaml.j2 | 4 +- molecule/docker/goss/config_daemon.yaml.j2 | 18 ++-- molecule/elasticsearch.7/goss/config.yaml.j2 | 16 +-- .../elasticsearch.7/goss/environment.yaml.j2 | 14 +-- molecule/environment/goss/default.yaml.j2 | 6 +- molecule/fail2ban/goss/config.yaml.j2 | 8 +- molecule/files/fixtures/file | 2 +- molecule/files/goss/content.yaml.j2 | 16 +-- molecule/files/goss/copy.yaml.j2 | 8 +- molecule/files/goss/template.yaml.j2 | 16 +-- molecule/files/goss/url.yaml.j2 | 2 +- molecule/git/goss/config.yaml.j2 | 23 ++-- molecule/gitlab/goss/configs.yaml.j2 | 24 ++--- molecule/grafana/goss/config.yaml.j2 | 8 +- molecule/grafana_agent/goss/config.yaml.j2 | 8 +- molecule/haproxy/goss/config.yaml.j2 | 8 +- molecule/haproxy/goss/configs.yaml.j2 | 24 ++--- molecule/haproxy/goss/environment.yaml.j2 | 14 +-- molecule/haproxy/goss/errorfiles.yaml.j2 | 24 ++--- molecule/influxdb/goss/config.yaml.j2 | 12 +-- molecule/keepalived/goss/config.yaml.j2 | 8 +- molecule/keepalived/goss/environment.yaml.j2 | 14 +-- molecule/logrotate/goss/configs.yaml.j2 | 34 +++--- 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 | 8 +- molecule/maxscale.2.5/goss/configs.yaml.j2 | 24 ++--- molecule/maxscale.2.5/goss/default.yaml.j2 | 4 +- molecule/maxscale.2.5/goss/users.yaml.j2 | 12 +-- molecule/maxscale.23.02/goss/config.yaml.j2 | 8 +- molecule/maxscale.23.02/goss/configs.yaml.j2 | 24 ++--- molecule/maxscale.23.02/goss/default.yaml.j2 | 4 +- molecule/maxscale.23.02/goss/users.yaml.j2 | 12 +-- molecule/maxscale.6.1/goss/config.yaml.j2 | 8 +- molecule/maxscale.6.1/goss/configs.yaml.j2 | 24 ++--- molecule/maxscale.6.1/goss/default.yaml.j2 | 4 +- molecule/maxscale.6.1/goss/users.yaml.j2 | 12 +-- molecule/mongodb.4.4/goss/config.yaml.j2 | 14 +-- molecule/motd/goss/scripts.yaml.j2 | 30 +++--- molecule/mysql.5.7/goss/config.yaml.j2 | 16 +-- molecule/mysql.5.7/goss/configs.yaml.j2 | 36 +++---- molecule/mysql.8.0/goss/config.yaml.j2 | 16 +-- molecule/mysql.8.0/goss/configs.yaml.j2 | 36 +++---- .../mysql.mariadb.10.11/goss/config.yaml.j2 | 16 +-- .../mysql.mariadb.10.11/goss/configs.yaml.j2 | 36 +++---- molecule/network/goss/hosts.yaml.j2 | 10 +- .../network/goss/interfaces_config.yaml.j2 | 8 +- .../network/goss/interfaces_configs.yaml.j2 | 24 ++--- molecule/network/goss/netplan_configs.yaml.j2 | 12 +-- molecule/network/goss/resolver_config.yaml.j2 | 8 +- molecule/network/goss/routing_tables.yaml.j2 | 12 +-- molecule/nginx/goss/config.yaml.j2 | 24 ++--- molecule/nginx/goss/configs.yaml.j2 | 40 +++---- molecule/ngrok/goss/configs.yaml.j2 | 28 ++--- molecule/ohmyzsh/goss/custom_themes.yaml.j2 | 24 ++--- molecule/ohmyzsh/goss/users.yaml.j2 | 22 ++-- .../pam_ssh_agent_auth/goss/default.yaml.j2 | 8 +- molecule/php.5.6/goss/configs.yaml.j2 | 72 ++++++------- molecule/php.5.6/goss/fpm_pools.yaml.j2 | 55 +++++----- molecule/php.7.4/goss/configs.yaml.j2 | 72 ++++++------- molecule/php.7.4/goss/fpm_pools.yaml.j2 | 55 +++++----- molecule/php.8.2/goss/configs.yaml.j2 | 72 ++++++------- molecule/php.8.2/goss/fpm_pools.yaml.j2 | 59 ++++++----- molecule/postgresql.9.4/goss/config.yaml.j2 | 16 +-- molecule/proftpd/goss/configs.yaml.j2 | 30 +++--- molecule/proftpd/goss/users.yaml.j2 | 6 +- molecule/prometheus/goss/default.yaml.j2 | 4 +- molecule/promtail/goss/default.yaml.j2 | 2 +- molecule/redis.6.0/goss/config.yaml.j2 | 22 ++-- molecule/redis.7.0/goss/config.yaml.j2 | 22 ++-- molecule/rsyslog/goss/config.yaml.j2 | 12 +-- molecule/rsyslog/goss/configs.yaml.j2 | 24 ++--- molecule/sensu_go/goss/config.yaml.j2 | 15 ++- molecule/shorewall/goss/config.yaml.j2 | 8 +- molecule/shorewall/goss/configs.yaml.j2 | 24 ++--- molecule/ssh/goss/config.yaml.j2 | 44 ++++---- molecule/ssh/goss/default.yaml.j2 | 2 +- molecule/sudo/goss/sudoers.yaml.j2 | 24 ++--- molecule/supervisor/goss/config.yaml.j2 | 23 ++-- molecule/supervisor/goss/configs.yaml.j2 | 39 +++---- molecule/systemd/goss/system_configs.yaml.j2 | 24 ++--- .../systemd/goss/tmpfiles_configs.yaml.j2 | 24 ++--- molecule/telegraf/goss/config.yaml.j2 | 28 +++-- molecule/telegraf/goss/configs.yaml.j2 | 44 ++++---- molecule/timezone/goss/default.yaml.j2 | 4 +- molecule/vim/goss/config.yaml.j2 | 14 +-- 114 files changed, 1167 insertions(+), 1157 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..fe6d18c5a 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(6) }} # 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(6) }} # 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(6) }} + {{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') | indent(6) }} # 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(6) }} # 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..821cd1797 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(6) }} /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(6) }} # 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(6) }} /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(6) }} # 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(6) }} /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(6) }} # 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(6) }} /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(6) }} /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(6) }} /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(6) }} # 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..aabd82033 100644 --- a/molecule/ansible/goss/config.yaml.j2 +++ b/molecule/ansible/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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..f62cc70f9 100644 --- a/molecule/ansible/goss/group_vars.yaml.j2 +++ b/molecule/ansible/goss/group_vars.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..f62cc70f9 100644 --- a/molecule/ansible/goss/host_vars.yaml.j2 +++ b/molecule/ansible/goss/host_vars.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..aabd82033 100644 --- a/molecule/ansible/goss/hosts.yaml.j2 +++ b/molecule/ansible/goss/hosts.yaml.j2 @@ -7,13 +7,13 @@ 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..f62cc70f9 100644 --- a/molecule/apparmor/goss/configs.yaml.j2 +++ b/molecule/apparmor/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..f62cc70f9 100644 --- a/molecule/apt/goss/configs.yaml.j2 +++ b/molecule/apt/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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/keys.yaml.j2 b/molecule/apt/goss/keys.yaml.j2 index 066696fe0..bb8320479 100644 --- a/molecule/apt/goss/keys.yaml.j2 +++ b/molecule/apt/goss/keys.yaml.j2 @@ -5,11 +5,11 @@ command: "apt-key adv --list-public-keys --with-colons | grep '^pub' | cut -d':' -f 5 | egrep -o '.{8}$'": exit-status: 0 stdout: - - 95BD4743 # Sury_php - - 7BD9BF62 # Nginx - - 86E50310 # Yarn - - ACCC4CF8 # PostgreSQL - - 0A3F7426 # Sensu Go - - 056E8E56 # RabbitMQ - - BC19DDBA # Galera - - 65558117 # Multimedia + - "95BD4743" # Sury_php + - "7BD9BF62" # Nginx + - "86E50310" # Yarn + - "ACCC4CF8" # PostgreSQL + - "0A3F7426" # Sensu Go + - "056E8E56" # RabbitMQ + - "BC19DDBA" # Galera + - "65558117" # Multimedia diff --git a/molecule/apt/goss/preferences.yaml.j2 b/molecule/apt/goss/preferences.yaml.j2 index 88fd28a1a..3655f0189 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,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Template$/" + contents: | + Template # Default - Flatten {{ tests_dir }}/default/flatten: exists: true @@ -121,10 +121,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 +155,16 @@ 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..2b689100d 100644 --- a/molecule/apt/goss/sources_list.yaml.j2 +++ b/molecule/apt/goss/sources_list.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Template {{ tests_dir }}/template: exists: true @@ -18,5 +18,5 @@ 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..1b07157bb 100644 --- a/molecule/aptly/goss/config.yaml.j2 +++ b/molecule/aptly/goss/config.yaml.j2 @@ -7,26 +7,26 @@ 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/aptly/goss/repositories.yaml.j2 b/molecule/aptly/goss/repositories.yaml.j2 index e6ced4ab3..25406aff2 100644 --- a/molecule/aptly/goss/repositories.yaml.j2 +++ b/molecule/aptly/goss/repositories.yaml.j2 @@ -10,21 +10,21 @@ command: aptly repo show foo: exit-status: 0 timeout: 30000 - stdout: - - "Name: foo" - - "Comment: Foo" - - "Default Distribution: bullseye" - - "Default Component: main" - - "Number of packages: 0" + stdout: | + Name: foo + Comment: Foo + Default Distribution: bullseye + Default Component: main + Number of packages: 0 aptly repo show bar: exit-status: 0 timeout: 30000 - stdout: - - "Name: bar" - - "Comment: Bar" - - "Default Distribution: bookworm" - - "Default Component: main" - - "Number of packages: 0" + stdout: | + Name: bar + Comment: Bar + Default Distribution: bookworm + Default Component: main + Number of packages: 0 file: {{ tests_dir }}/public/dists/bullseye/Release: diff --git a/molecule/backup_manager/goss/configs.yaml.j2 b/molecule/backup_manager/goss/configs.yaml.j2 index 7ea9ff399..ca5209a88 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: | + 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" + export BM_REPOSITORY_ROOT="/srv/backup/mysql" + export BM_TARBALL_DIRECTORIES="foo bar baz" # Default - Content {{ tests_dir }}/default/content: exists: true @@ -27,8 +27,8 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -36,16 +36,16 @@ 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 +83,24 @@ 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..880a30619 100644 --- a/molecule/bind/goss/configs.yaml.j2 +++ b/molecule/bind/goss/configs.yaml.j2 @@ -7,16 +7,16 @@ 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..0f775d8d9 100644 --- a/molecule/bind/goss/zones.yaml.j2 +++ b/molecule/bind/goss/zones.yaml.j2 @@ -7,16 +7,16 @@ 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 +27,8 @@ file: owner: bind group: bind mode: "0644" - contains: - - "/^Dynamic$/" + contents: | + Dynamic {{ tests_dir }}/db.dynamic_existing: exists: true - contains: - - "!/^Dynamic existing$/" + contents: "" diff --git a/molecule/cloud_init/goss/configs.yaml.j2 b/molecule/cloud_init/goss/configs.yaml.j2 index ff0e5852f..f62cc70f9 100644 --- a/molecule/cloud_init/goss/configs.yaml.j2 +++ b/molecule/cloud_init/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..98e692826 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": { + "password": "my-secret-password1", + "username": "my-username1" + } + } + } diff --git a/molecule/cron/goss/files.yaml.j2 b/molecule/cron/goss/files.yaml.j2 index c630c8443..3cc110da2 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,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: |+ + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -31,16 +30,16 @@ 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 +77,24 @@ 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 +102,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/deploy/goss/clean.yaml.j2 b/molecule/deploy/goss/clean.yaml.j2 index 766aab78e..a50128433 100644 --- a/molecule/deploy/goss/clean.yaml.j2 +++ b/molecule/deploy/goss/clean.yaml.j2 @@ -3,5 +3,5 @@ command: find {{ tests_dir }}/app/releases -mindepth 1 -maxdepth 1 -type d | wc -l: exit-status: 0 - stdout: - - 3 + stdout: | + 3 diff --git a/molecule/dhcp/goss/default.yaml.j2 b/molecule/dhcp/goss/default.yaml.j2 index ea849fb1b..cf91ceb21 100644 --- a/molecule/dhcp/goss/default.yaml.j2 +++ b/molecule/dhcp/goss/default.yaml.j2 @@ -17,7 +17,7 @@ file: owner: root group: root mode: "0644" - contains: + contents: - INTERFACESv4="{{ ansible_facts.default_ipv4.interface }}" # Config {{ manala_dhcp_config_file }}: @@ -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..f62cc70f9 100644 --- a/molecule/dnsmasq/goss/configs.yaml.j2 +++ b/molecule/dnsmasq/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..a08d4e2f8 100644 --- a/molecule/docker/goss/applications.yaml.j2 +++ b/molecule/docker/goss/applications.yaml.j2 @@ -19,8 +19,8 @@ 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..34d9d84e9 100644 --- a/molecule/docker/goss/config_daemon.yaml.j2 +++ b/molecule/docker/goss/config_daemon.yaml.j2 @@ -7,24 +7,24 @@ 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..4b2eee0f4 100644 --- a/molecule/elasticsearch.7/goss/config.yaml.j2 +++ b/molecule/elasticsearch.7/goss/config.yaml.j2 @@ -7,23 +7,23 @@ 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..22d7b4896 100644 --- a/molecule/elasticsearch.7/goss/environment.yaml.j2 +++ b/molecule/elasticsearch.7/goss/environment.yaml.j2 @@ -7,22 +7,22 @@ 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..05d5b48ac 100644 --- a/molecule/environment/goss/default.yaml.j2 +++ b/molecule/environment/goss/default.yaml.j2 @@ -4,7 +4,7 @@ file: /etc/environment: exists: true filetype: file - contains: + contents: - '_FOO="bar"' - '_BAR="123"' - 'BAR="123"' @@ -14,7 +14,7 @@ file: /etc/zsh/zshenv: exists: true filetype: file - contains: + contents: - '# /etc/zsh/zshenv' - 'export BAR="123"' - 'export BAZ="1.2"' @@ -23,7 +23,7 @@ file: {{ tests_dir }}/file: exists: true filetype: file - contains: + contents: - '# {{ tests_dir }}/file' - 'export BAR="123"' - 'export BAZ="1.2"' diff --git a/molecule/fail2ban/goss/config.yaml.j2 b/molecule/fail2ban/goss/config.yaml.j2 index 30ac39316..aabd82033 100644 --- a/molecule/fail2ban/goss/config.yaml.j2 +++ b/molecule/fail2ban/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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/fixtures/file b/molecule/files/fixtures/file index a0fe4515f..220f4aa98 100644 --- a/molecule/files/fixtures/file +++ b/molecule/files/fixtures/file @@ -1 +1 @@ -File \ No newline at end of file +File diff --git a/molecule/files/goss/content.yaml.j2 b/molecule/files/goss/content.yaml.j2 index ed7c0d038..072af959c 100644 --- a/molecule/files/goss/content.yaml.j2 +++ b/molecule/files/goss/content.yaml.j2 @@ -5,13 +5,13 @@ 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 +23,15 @@ 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..1edbcd5c9 100644 --- a/molecule/files/goss/copy.yaml.j2 +++ b/molecule/files/goss/copy.yaml.j2 @@ -5,13 +5,13 @@ 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..df27290bb 100644 --- a/molecule/files/goss/template.yaml.j2 +++ b/molecule/files/goss/template.yaml.j2 @@ -5,13 +5,13 @@ 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 +23,15 @@ 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..ce4fbc8f5 100644 --- a/molecule/git/goss/config.yaml.j2 +++ b/molecule/git/goss/config.yaml.j2 @@ -7,26 +7,27 @@ file: owner: root group: root mode: "0644" - contains: - - "[foo]" - - " foo = true" - - " bar = false" - - "[bar]" - - " foo = bar" - - " bar = 123" + contents: | + [bar] + bar = 123 + foo = bar + + [foo] + bar = false + foo = 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/gitlab/goss/configs.yaml.j2 b/molecule/gitlab/goss/configs.yaml.j2 index 6533cbc38..0b1ce8e9a 100644 --- a/molecule/gitlab/goss/configs.yaml.j2 +++ b/molecule/gitlab/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..aabd82033 100644 --- a/molecule/grafana/goss/config.yaml.j2 +++ b/molecule/grafana/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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..6d36254ea 100644 --- a/molecule/grafana_agent/goss/config.yaml.j2 +++ b/molecule/grafana_agent/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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..aabd82033 100644 --- a/molecule/haproxy/goss/config.yaml.j2 +++ b/molecule/haproxy/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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..f62cc70f9 100644 --- a/molecule/haproxy/goss/configs.yaml.j2 +++ b/molecule/haproxy/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..a66d3e245 100644 --- a/molecule/haproxy/goss/environment.yaml.j2 +++ b/molecule/haproxy/goss/environment.yaml.j2 @@ -7,22 +7,22 @@ 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..f62cc70f9 100644 --- a/molecule/haproxy/goss/errorfiles.yaml.j2 +++ b/molecule/haproxy/goss/errorfiles.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..04bd423f6 100644 --- a/molecule/influxdb/goss/config.yaml.j2 +++ b/molecule/influxdb/goss/config.yaml.j2 @@ -7,21 +7,21 @@ 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..aabd82033 100644 --- a/molecule/keepalived/goss/config.yaml.j2 +++ b/molecule/keepalived/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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..af641bab1 100644 --- a/molecule/keepalived/goss/environment.yaml.j2 +++ b/molecule/keepalived/goss/environment.yaml.j2 @@ -7,22 +7,22 @@ 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..8a6afcb44 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,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -30,16 +30,16 @@ 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 +77,24 @@ 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..35ae1bac7 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..f7c769e47 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..aabd82033 100644 --- a/molecule/maxscale.2.5/goss/config.yaml.j2 +++ b/molecule/maxscale.2.5/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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..f62cc70f9 100644 --- a/molecule/maxscale.2.5/goss/configs.yaml.j2 +++ b/molecule/maxscale.2.5/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..2b989cf61 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..0342cbf18 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,13 @@ 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..aabd82033 100644 --- a/molecule/maxscale.23.02/goss/config.yaml.j2 +++ b/molecule/maxscale.23.02/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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..f62cc70f9 100644 --- a/molecule/maxscale.23.02/goss/configs.yaml.j2 +++ b/molecule/maxscale.23.02/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..75dee5e97 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..f118d62a2 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,13 @@ 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..aabd82033 100644 --- a/molecule/maxscale.6.1/goss/config.yaml.j2 +++ b/molecule/maxscale.6.1/goss/config.yaml.j2 @@ -7,13 +7,13 @@ 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..f62cc70f9 100644 --- a/molecule/maxscale.6.1/goss/configs.yaml.j2 +++ b/molecule/maxscale.6.1/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..3fa16525b 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..0342cbf18 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,13 @@ 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..0d829d455 100644 --- a/molecule/mongodb.4.4/goss/config.yaml.j2 +++ b/molecule/mongodb.4.4/goss/config.yaml.j2 @@ -7,22 +7,22 @@ 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..f2fe8968a 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,8 @@ file: owner: root group: root mode: "0755" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -28,16 +28,16 @@ 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 +75,24 @@ 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..4dc00b983 100644 --- a/molecule/mysql.5.7/goss/config.yaml.j2 +++ b/molecule/mysql.5.7/goss/config.yaml.j2 @@ -7,23 +7,23 @@ 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..d7a6ce6a9 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] + enforce_gtid_consistency = OFF + gtid_mode = ON + query_cache_size = 0 + user = mysql # Default - Content {{ tests_dir }}/default/content: exists: true @@ -22,8 +22,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -31,16 +31,16 @@ 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 +78,24 @@ 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..4dc00b983 100644 --- a/molecule/mysql.8.0/goss/config.yaml.j2 +++ b/molecule/mysql.8.0/goss/config.yaml.j2 @@ -7,23 +7,23 @@ 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..d7a6ce6a9 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] + enforce_gtid_consistency = OFF + gtid_mode = ON + query_cache_size = 0 + user = mysql # Default - Content {{ tests_dir }}/default/content: exists: true @@ -22,8 +22,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -31,16 +31,16 @@ 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 +78,24 @@ 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..4dc00b983 100644 --- a/molecule/mysql.mariadb.10.11/goss/config.yaml.j2 +++ b/molecule/mysql.mariadb.10.11/goss/config.yaml.j2 @@ -7,23 +7,23 @@ 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..d7a6ce6a9 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] + enforce_gtid_consistency = OFF + gtid_mode = ON + query_cache_size = 0 + user = mysql # Default - Content {{ tests_dir }}/default/content: exists: true @@ -22,8 +22,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -31,16 +31,16 @@ 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 +78,24 @@ 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..aabd82033 100644 --- a/molecule/network/goss/interfaces_config.yaml.j2 +++ b/molecule/network/goss/interfaces_config.yaml.j2 @@ -7,13 +7,13 @@ 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..429673177 100644 --- a/molecule/network/goss/interfaces_configs.yaml.j2 +++ b/molecule/network/goss/interfaces_configs.yaml.j2 @@ -8,8 +8,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -17,16 +17,16 @@ 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 +64,24 @@ 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..97ab17deb 100644 --- a/molecule/network/goss/netplan_configs.yaml.j2 +++ b/molecule/network/goss/netplan_configs.yaml.j2 @@ -12,8 +12,8 @@ file: owner: root group: root mode: "0600" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -21,13 +21,13 @@ 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..aabd82033 100644 --- a/molecule/network/goss/resolver_config.yaml.j2 +++ b/molecule/network/goss/resolver_config.yaml.j2 @@ -7,13 +7,13 @@ 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..59f36e2e1 100644 --- a/molecule/nginx/goss/config.yaml.j2 +++ b/molecule/nginx/goss/config.yaml.j2 @@ -7,27 +7,27 @@ file: owner: root group: root mode: "0644" - contains: - - _true on; - - _false off; - - _array foo; - - _array bar; - - _string string; - - _integer 123; - - _float 4.56; + contents: | + _array foo; + _array bar; + _false off; + _float 4.56; + _integer 123; + _string string; + _true on; {{ 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..a456b09ac 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: | + _array foo; + _array bar; + _false off; + _float 4.56; + _integer 123; + _string string; + _true on; # Default - Content {{ tests_dir }}/default/content: exists: true @@ -24,8 +24,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -33,16 +33,16 @@ 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 +80,24 @@ 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..cf94c20f1 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,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -27,16 +27,16 @@ 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 +74,24 @@ 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..f62cc70f9 100644 --- a/molecule/ohmyzsh/goss/custom_themes.yaml.j2 +++ b/molecule/ohmyzsh/goss/custom_themes.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..f500394c6 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: | + bar="true" + baz="false" + corge=(foo bar baz) + foo="" + quux=123 + qux="foo" # Content {{ tests_dir }}/content/.zshrc: exists: true @@ -23,8 +23,8 @@ file: owner: user_content group: user_content mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Template {{ tests_dir }}/template/.zshrc: exists: true @@ -32,8 +32,8 @@ 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..16ed2729a 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..e8f18a5ce 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,16 @@ 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 +58,32 @@ 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 +148,64 @@ 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..48057473f 100644 --- a/molecule/php.5.6/goss/fpm_pools.yaml.j2 +++ b/molecule/php.5.6/goss/fpm_pools.yaml.j2 @@ -9,21 +9,22 @@ 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: | + [bar] + group = bar + user = bar + + [www] + env[BAR] = 123 + env[BAZ] = 1.2 + env[FOO] = bar + env[QUX] = foo=bar + group = foo + include = /include-1 + include = /include-2 + php_admin_value[memory_limit] = 123M + php_value[display_errors] = no + user = foo # Default - Content {{ tests_dir }}/default/content: exists: true @@ -31,8 +32,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -40,16 +41,16 @@ 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 +88,24 @@ 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..e8f18a5ce 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,16 @@ 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 +58,32 @@ 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 +148,64 @@ 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..48057473f 100644 --- a/molecule/php.7.4/goss/fpm_pools.yaml.j2 +++ b/molecule/php.7.4/goss/fpm_pools.yaml.j2 @@ -9,21 +9,22 @@ 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: | + [bar] + group = bar + user = bar + + [www] + env[BAR] = 123 + env[BAZ] = 1.2 + env[FOO] = bar + env[QUX] = foo=bar + group = foo + include = /include-1 + include = /include-2 + php_admin_value[memory_limit] = 123M + php_value[display_errors] = no + user = foo # Default - Content {{ tests_dir }}/default/content: exists: true @@ -31,8 +32,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -40,16 +41,16 @@ 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 +88,24 @@ 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..e8f18a5ce 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,16 @@ 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 +58,32 @@ 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 +148,64 @@ 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..79966d10a 100644 --- a/molecule/php.8.2/goss/fpm_pools.yaml.j2 +++ b/molecule/php.8.2/goss/fpm_pools.yaml.j2 @@ -9,23 +9,24 @@ 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: | + [bar] + group = bar + user = bar + + [www] + access.suppress_path[] = /access.suppress_path-1 + access.suppress_path[] = /access.suppress_path-2 + env[BAR] = 123 + env[BAZ] = 1.2 + env[FOO] = bar + env[QUX] = foo=bar + group = foo + include = /include-1 + include = /include-2 + php_admin_value[memory_limit] = 123M + php_value[display_errors] = no + user = foo # Default - Content {{ tests_dir }}/default/content: exists: true @@ -33,8 +34,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -42,16 +43,16 @@ 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 +90,24 @@ 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..23132a213 100644 --- a/molecule/postgresql.9.4/goss/config.yaml.j2 +++ b/molecule/postgresql.9.4/goss/config.yaml.j2 @@ -7,29 +7,29 @@ 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..ef9c09777 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: | + DefaultRoot ~ + ServerName Manala ProFTPD Server # Default - Content {{ tests_dir }}/default/content: exists: true @@ -18,8 +18,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -27,16 +27,16 @@ 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 +74,24 @@ 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..bcceffc22 100644 --- a/molecule/prometheus/goss/default.yaml.j2 +++ b/molecule/prometheus/goss/default.yaml.j2 @@ -56,7 +56,7 @@ file: owner: root group: root mode: "0644" - contains: + contents: - "[Unit]" - "Description=Prometheus" {{ manala_prometheus_node_exporter_service_file }}: @@ -65,7 +65,7 @@ file: owner: root group: root mode: "0644" - contains: + contents: - "[Unit]" - "Description=Prometheus Node Exporter" diff --git a/molecule/promtail/goss/default.yaml.j2 b/molecule/promtail/goss/default.yaml.j2 index 98b06e0db..9f257c2fc 100644 --- a/molecule/promtail/goss/default.yaml.j2 +++ b/molecule/promtail/goss/default.yaml.j2 @@ -49,7 +49,7 @@ file: owner: root group: root mode: "0644" - contains: + contents: - "[Unit]" - "Description=Promtail" diff --git a/molecule/redis.6.0/goss/config.yaml.j2 b/molecule/redis.6.0/goss/config.yaml.j2 index f727f9bbe..f27d116a9 100644 --- a/molecule/redis.6.0/goss/config.yaml.j2 +++ b/molecule/redis.6.0/goss/config.yaml.j2 @@ -7,29 +7,29 @@ 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..f27d116a9 100644 --- a/molecule/redis.7.0/goss/config.yaml.j2 +++ b/molecule/redis.7.0/goss/config.yaml.j2 @@ -7,29 +7,29 @@ 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..4019a354a 100644 --- a/molecule/rsyslog/goss/config.yaml.j2 +++ b/molecule/rsyslog/goss/config.yaml.j2 @@ -7,8 +7,8 @@ file: owner: root group: root mode: "0644" - contains: - - #$ModLoad imklog + contents: + - "#$ModLoad imklog" - $FileOwner foo {{ tests_dir }}/content: exists: true @@ -16,13 +16,13 @@ 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..f62cc70f9 100644 --- a/molecule/rsyslog/goss/configs.yaml.j2 +++ b/molecule/rsyslog/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..fd2a788de 100644 --- a/molecule/sensu_go/goss/config.yaml.j2 +++ b/molecule/sensu_go/goss/config.yaml.j2 @@ -7,9 +7,11 @@ 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 +19,8 @@ file: owner: sensu group: sensu mode: "0640" - contains: - - "state-dir: /tmp" + contents: | + --- + # Sensu backend configuration + + 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..f62cc70f9 100644 --- a/molecule/shorewall/goss/configs.yaml.j2 +++ b/molecule/shorewall/goss/configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..901bea556 100644 --- a/molecule/ssh/goss/config.yaml.j2 +++ b/molecule/ssh/goss/config.yaml.j2 @@ -13,55 +13,55 @@ 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: | + bar yes + baz no + corge foo + corge bar + corge baz + foo none + grault + bar 123 + foo bar + quux 123 + qux foo {{ 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..2a8300b5d 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: + contents: - github.com ecdsa-sha2-nistp256 diff --git a/molecule/sudo/goss/sudoers.yaml.j2 b/molecule/sudo/goss/sudoers.yaml.j2 index bb2affab5..d2dd666d3 100644 --- a/molecule/sudo/goss/sudoers.yaml.j2 +++ b/molecule/sudo/goss/sudoers.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0440" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..8900bbec4 100644 --- a/molecule/supervisor/goss/config.yaml.j2 +++ b/molecule/supervisor/goss/config.yaml.j2 @@ -7,26 +7,27 @@ 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: | + [supervisord] + logfile=/var/log/supervisord.log + + [unix_http_server] + chmod=0700 + chown=nobody:nogroup + file=/tmp/supervisor.sock {{ 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..5cc90919f 100644 --- a/molecule/supervisor/goss/configs.yaml.j2 +++ b/molecule/supervisor/goss/configs.yaml.j2 @@ -9,13 +9,14 @@ 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: | + [supervisord] + logfile=/var/log/supervisord.log + + [unix_http_server] + file=/tmp/supervisor.sock + chmod=0700 + chown=nobody:nogroup # Default - Content {{ tests_dir }}/default/content: exists: true @@ -23,8 +24,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -32,16 +33,16 @@ 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 +80,24 @@ 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..f62cc70f9 100644 --- a/molecule/systemd/goss/system_configs.yaml.j2 +++ b/molecule/systemd/goss/system_configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..f62cc70f9 100644 --- a/molecule/systemd/goss/tmpfiles_configs.yaml.j2 +++ b/molecule/systemd/goss/tmpfiles_configs.yaml.j2 @@ -9,8 +9,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -18,16 +18,16 @@ 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 +65,24 @@ 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..a24909934 100644 --- a/molecule/telegraf/goss/config.yaml.j2 +++ b/molecule/telegraf/goss/config.yaml.j2 @@ -7,26 +7,32 @@ file: owner: root group: root mode: "0644" - contains: - - "[global_tags]" - - 'foo = "bar"' - - "[agent]" - - 'hostname = "test.manala.dev"' - - "quiet = true" - - "metric_batch_size = 1234" + contents: | + [agent] + hostname = "test.manala.dev" + metric_batch_size = 1234 + quiet = true + + [global_tags] + foo = "bar" + + [[inputs.cpu]] + + [[outputs.file]] + files = ["/dev/null"] {{ 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..4afb44521 100644 --- a/molecule/telegraf/goss/configs.yaml.j2 +++ b/molecule/telegraf/goss/configs.yaml.j2 @@ -9,13 +9,19 @@ file: owner: root group: root mode: "0644" - contains: - - "[global_tags]" - - 'foo = "bar"' - - "[agent]" - - 'hostname = "test.manala.dev"' - - "quiet = true" - - "metric_batch_size = 1234" + contents: | + [agent] + hostname = "test.manala.dev" + metric_batch_size = 1234 + quiet = true + + [global_tags] + foo = "bar" + + [[inputs.cpu]] + + [[outputs.file]] + files = ["/dev/null"] # Default - Content {{ tests_dir }}/default/content: exists: true @@ -23,8 +29,8 @@ file: owner: root group: root mode: "0644" - contains: - - "/^Content$/" + contents: | + Content # Default - Template {{ tests_dir }}/default/template: exists: true @@ -32,16 +38,16 @@ 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 +85,24 @@ 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..475182f0d 100644 --- a/molecule/vim/goss/config.yaml.j2 +++ b/molecule/vim/goss/config.yaml.j2 @@ -7,22 +7,22 @@ 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