Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace r10k template with native puppet code #613

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

bastelfreak
Copy link
Member

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@bastelfreak
Copy link
Member Author

my old config:

---
:cachedir: /opt/puppetlabs/puppet/cache/r10k
:sources:
  puppet:
    basedir: /etc/puppetlabs/code/environments
    remote: https://github.com/voxpupuli/controlrepo.git

:deploy:
  exclude_spec: true
  generate_types: true

:pool_size: 8

the diff:

--- /etc/puppetlabs/r10k/r10k.yaml	2023-07-28 15:17:00.741299271 +0000
+++ /tmp/puppet-file20230728-37849-e7olvk	2023-07-28 21:00:18.536130396 +0000
@@ -1,12 +1,10 @@
 ---
-:cachedir: /opt/puppetlabs/puppet/cache/r10k
-:sources:
+pool_size: 8
+deploy:
+  generate_types: true
+  exclude_spec: true
+cachedir: "/opt/puppetlabs/puppet/cache/r10k"
+sources:
   puppet:
-    basedir: /etc/puppetlabs/code/environments
     remote: https://github.com/voxpupuli/controlrepo.git
-
-:deploy:
-  exclude_spec: true
-  generate_types: true
-
-:pool_size: 8
+    basedir: "/etc/puppetlabs/code/environments"

the new file:

---
pool_size: 8
deploy:
  generate_types: true
  exclude_spec: true
cachedir: "/opt/puppetlabs/puppet/cache/r10k"
sources:
  puppet:
    remote: https://github.com/voxpupuli/controlrepo.git
    basedir: "/etc/puppetlabs/code/environments"

that seems totally fine. They keys don't need to be symbols. The official documention has them as strings as well: https://github.com/puppetlabs/r10k/blob/main/doc/dynamic-environments/configuration.mkd#baseurl

@bastelfreak bastelfreak force-pushed the template branch 2 times, most recently from aef61df to 62fdff4 Compare July 28, 2023 21:30
@bastelfreak
Copy link
Member Author

I only added the backwards-incompatible flag because we removed the parameter for the template path from the class. the generated r10k config stays the same (hopefully, at least in my tests).

Copy link
Contributor

@zilchms zilchms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bastelfreak bastelfreak merged commit 1fa0240 into voxpupuli:master Jul 29, 2023
11 checks passed
@bastelfreak bastelfreak deleted the template branch July 29, 2023 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants