Skip to content

Commit

Permalink
Update goss
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Oct 18, 2023
1 parent 9871280 commit d59abf7
Show file tree
Hide file tree
Showing 110 changed files with 1,147 additions and 1,159 deletions.
2 changes: 1 addition & 1 deletion molecule/Dockerfile.debian.bookworm.j2
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion molecule/Dockerfile.debian.bullseye.j2
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion molecule/Dockerfile.debian.buster.j2
Original file line number Diff line number Diff line change
@@ -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

Expand Down
19 changes: 9 additions & 10 deletions molecule/accounts/goss/users_authorized_keys.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@ file:
filetype: file
owner: user_ak_verbose_syntax
mode: "0600"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }}
# Flatten
/home/user_ak_flatten/.ssh/authorized_keys:
exists: true
filetype: file
owner: user_ak_flatten
mode: "0600"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }}
# Multiple
/home/user_ak_multiple/.ssh/authorized_keys:
exists: true
filetype: file
owner: user_ak_multiple
mode: "0600"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}"
- "{{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }}
{{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') | indent(4) }}
# File
/home/user_ak_file/.ssh/authorized_keys:
exists: false
Expand All @@ -53,9 +53,8 @@ file:
filetype: file
owner: user_ak_file
mode: "0600"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}"
- "!{{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }}
# State
/home/user_ak_state_ignore/.ssh/authorized_keys:
exists: false
50 changes: 20 additions & 30 deletions molecule/accounts/goss/users_keys.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ file:
owner: user_k_private
group: user_k_private
mode: "0600"
contains:
{% for line in lookup('ansible.builtin.file', 'fixtures/key_1').splitlines() %}
- "{{ line }}"
{% endfor %}
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1') | indent(4) }}
/home/user_k_private/.ssh/id_rsa.pub:
exists: false
# Public
Expand All @@ -71,8 +69,8 @@ file:
owner: user_k_public
group: user_k_public
mode: "0644"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }}
# Verbose syntax
/home/user_k_verbose_syntax/.ssh:
exists: true
Expand All @@ -86,18 +84,16 @@ file:
owner: user_k_verbose_syntax
group: user_k_verbose_syntax
mode: "0600"
contains:
{% for line in lookup('ansible.builtin.file', 'fixtures/key_1').splitlines() %}
- "{{ line }}"
{% endfor %}
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1') | indent(4) }}
/home/user_k_verbose_syntax/.ssh/id_rsa.pub:
exists: true
filetype: file
owner: user_k_verbose_syntax
group: user_k_verbose_syntax
mode: "0644"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }}
# Flatten
/home/user_k_flatten/.ssh:
exists: true
Expand All @@ -111,18 +107,16 @@ file:
owner: user_k_flatten
group: user_k_flatten
mode: "0600"
contains:
{% for line in lookup('ansible.builtin.file', 'fixtures/key_1').splitlines() %}
- "{{ line }}"
{% endfor %}
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1') | indent(4) }}
/home/user_k_flatten/.ssh/id_rsa.pub:
exists: true
filetype: file
owner: user_k_flatten
group: user_k_flatten
mode: "0644"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }}
# Multiple
/home/user_k_multiple/.ssh:
exists: true
Expand All @@ -136,36 +130,32 @@ file:
owner: user_k_multiple
group: user_k_multiple
mode: "0600"
contains:
{% for line in lookup('ansible.builtin.file', 'fixtures/key_1').splitlines() %}
- "{{ line }}"
{% endfor %}
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1') | indent(4) }}
/home/user_k_multiple/.ssh/id_rsa_1.pub:
exists: true
filetype: file
owner: user_k_multiple
group: user_k_multiple
mode: "0644"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_1.pub') | indent(4) }}
/home/user_k_multiple/.ssh/id_rsa_2:
exists: true
filetype: file
owner: user_k_multiple
group: user_k_multiple
mode: "0600"
contains:
{% for line in lookup('ansible.builtin.file', 'fixtures/key_2').splitlines() %}
- "{{ line }}"
{% endfor %}
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_2') | indent(4) }}
/home/user_k_multiple/.ssh/id_rsa_2.pub:
exists: true
filetype: file
owner: user_k_multiple
group: user_k_multiple
mode: "0644"
contains:
- "{{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') }}"
contents: |
{{ lookup('ansible.builtin.file', 'fixtures/key_2.pub') | indent(4) }}
# State
/home/user_k_state_ignore/.ssh:
exists: false
8 changes: 4 additions & 4 deletions molecule/ansible/goss/config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 12 additions & 12 deletions molecule/ansible/goss/group_vars.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ file:
owner: root
group: root
mode: "0644"
contains:
- "/^Content$/"
contents: |
Content
# Default - Template
{{ tests_dir }}/default/template:
exists: true
filetype: 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
Expand Down Expand Up @@ -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:
Expand Down
24 changes: 12 additions & 12 deletions molecule/ansible/goss/host_vars.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ file:
owner: root
group: root
mode: "0644"
contains:
- "/^Content$/"
contents: |
Content
# Default - Template
{{ tests_dir }}/default/template:
exists: true
filetype: 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
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions molecule/ansible/goss/hosts.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit d59abf7

Please sign in to comment.