-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(puppet): add ehiera deployment and key management
- Loading branch information
Showing
5 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
roles/puppet/files/etc/puppetlabs/puppet/keys/private_key.pkcs7.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# UPDATE THE CONTENT AND ENCRYPT ME |
1 change: 1 addition & 0 deletions
1
roles/puppet/files/etc/puppetlabs/puppet/keys/public_key.pkcs7.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# UPDATE THE CONTENT AND ENCRYPT ME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
|
||
- name: PUPPET EHIERA | Install prerequisites | ||
package: | ||
name: rubygems | ||
state: present | ||
|
||
- name: PUPPET EHIERA | Install the ehiera gem | ||
gem: | ||
name: hiera-eyaml | ||
state: present | ||
|
||
- name: PUPPET EHIERA | Add the gems to the Puppet server | ||
command: /opt/puppetlabs/bin/puppetserver gem install hiera-eyaml | ||
|
||
- name: PUPPET EHIERA | Create a key | ||
command: eyaml createkeys | ||
when: puppet_ehiera_create_key | ||
|
||
- name: PUPPET EHIERA | Create directory | ||
file: | ||
state: directory | ||
path: /etc/puppetlabs/puppet/keys | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
|
||
- name: PUPPET EHIERA | Deploy the eHiera key | ||
copy: | ||
src: etc/puppetlabs/puppet/keys/{{ item }} | ||
dest: /etc/puppetlabs/puppet/keys/{{ item }} | ||
owner: root | ||
group: root | ||
mode: 0600 | ||
loop: | ||
- private_key.pkcs7.pem | ||
- public_key.pkcs7.pem | ||
when: not puppet_ehiera_create_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters