Skip to content

Commit

Permalink
test(alma+rocky): add platforms (based on CentOS 8) [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Jun 30, 2021
1 parent 81d4098 commit 4f7a692
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/integration/default/controls/managed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

cert_dir = '/etc/ssl/certs/'
key_dir = '/etc/ssl/private/'
case os[:name]
when 'debian', 'ubuntu'
case platform[:family]
when 'debian'
cert_dir = '/usr/local/share/ca-certificates/'
when 'redhat', 'centos', 'fedora', 'amazon', 'oracle'
when 'redhat', 'fedora'
cert_dir = '/etc/pki/tls/certs/'
key_dir = '/etc/pki/tls/private/'
end
Expand Down
51 changes: 51 additions & 0 deletions test/integration/default/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# yamllint disable rule:indentation rule:line-length
# AlmaLinux-8
---
values:
cert_dir: /etc/pki/tls/certs
cert_ext: .crt
cert_group: root
cert_mode: 644
cert_source_dir: /tmp/kitchen/srv/salt/files/
cert_tmp_dir: /tmp/certs/
cert_user: root
certlist:
cert.and.key.to.add:
cert: "-----BEGIN CERTIFICATE-----\n1MOCKED CERT AND KEY\n-----END CERTIFICATE----- "
key: "-----BEGIN RSA PRIVATE KEY-----\n1MOCKED CERT AND KEY\n-----END RSA PRIVATE
KEY----- "
cert.and.key.to.remove:
cert: "-----BEGIN CERTIFICATE-----\n3MOCKED CERT AND KEY\n-----END CERTIFICATE----- "
key: "-----BEGIN RSA PRIVATE KEY-----\n3MOCKED CERT AND KEY\n-----END RSA PRIVATE
KEY----- "
remove: true
cert.and.key.with.ext.to.add:
cert: "-----BEGIN CERTIFICATE-----\n4MOCKED CERT AND KEY\n-----END CERTIFICATE----- "
cert_ext: ".pem"
key: "-----BEGIN RSA PRIVATE KEY-----\n4MOCKED CERT AND KEY\n-----END RSA PRIVATE
KEY----- "
key_ext: ".priv"
cert.from.src.to.add: {}
cert.to.add:
cert: "-----BEGIN CERTIFICATE-----\n2MOCKED CERT\n-----END CERTIFICATE----- "
certs_update_cmd: ""
key_dir: /etc/pki/tls/private
key_ext: .key
key_group: root
key_mode: 600
key_user: root
lookup:
cert_source_dir: "/tmp/kitchen/srv/salt/files/"
map_jinja:
sources:
- Y:G@osarch
- Y:G@os_family
- Y:G@os
- Y:G@oscodename
- Y:G@osfinger
- C@cert:lookup
- C@cert
- Y:G@id
pkgs:
- ca-certificates
remove: false
51 changes: 51 additions & 0 deletions test/integration/default/files/_mapdata/rockylinux-8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# yamllint disable rule:indentation rule:line-length
# Rocky Linux-8
---
values:
cert_dir: /etc/pki/tls/certs
cert_ext: .crt
cert_group: root
cert_mode: 644
cert_source_dir: /tmp/kitchen/srv/salt/files/
cert_tmp_dir: /tmp/certs/
cert_user: root
certlist:
cert.and.key.to.add:
cert: "-----BEGIN CERTIFICATE-----\n1MOCKED CERT AND KEY\n-----END CERTIFICATE----- "
key: "-----BEGIN RSA PRIVATE KEY-----\n1MOCKED CERT AND KEY\n-----END RSA PRIVATE
KEY----- "
cert.and.key.to.remove:
cert: "-----BEGIN CERTIFICATE-----\n3MOCKED CERT AND KEY\n-----END CERTIFICATE----- "
key: "-----BEGIN RSA PRIVATE KEY-----\n3MOCKED CERT AND KEY\n-----END RSA PRIVATE
KEY----- "
remove: true
cert.and.key.with.ext.to.add:
cert: "-----BEGIN CERTIFICATE-----\n4MOCKED CERT AND KEY\n-----END CERTIFICATE----- "
cert_ext: ".pem"
key: "-----BEGIN RSA PRIVATE KEY-----\n4MOCKED CERT AND KEY\n-----END RSA PRIVATE
KEY----- "
key_ext: ".priv"
cert.from.src.to.add: {}
cert.to.add:
cert: "-----BEGIN CERTIFICATE-----\n2MOCKED CERT\n-----END CERTIFICATE----- "
certs_update_cmd: ""
key_dir: /etc/pki/tls/private
key_ext: .key
key_group: root
key_mode: 600
key_user: root
lookup:
cert_source_dir: "/tmp/kitchen/srv/salt/files/"
map_jinja:
sources:
- Y:G@osarch
- Y:G@os_family
- Y:G@os
- Y:G@oscodename
- Y:G@osfinger
- C@cert:lookup
- C@cert
- Y:G@id
pkgs:
- ca-certificates
remove: false

0 comments on commit 4f7a692

Please sign in to comment.