Ask Your Question
0

Keep puppetfile modules up to date

asked 2017-07-27 09:48:24 -0500

eoggian gravatar image

Hello, I would like to know if puppet enterprise provides a way to keep modules defined in the puppetfile up to date, especially for those on my internal git repo (bitbucket).

I have two repos on bitbucket:

  1. control
  2. module

Let's say I modify the module manifest in some way.. Then I run the agent and I am expecting the changes to be applied on the node. Unfortunately remains unchanged as the module is not being updated on the puppet master.

I have to edit the control repo (to permit a git push) and then the module is uptaded to its latest version.

Now, I can run the agent and the changes are applied. I find this very annoying and I am wondering if there is a solution to that problem.

Any help is appreciated.

Thanks in advance.

Elia

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-08-07 08:57:42 -0500

sirinek gravatar image

updated 2018-08-07 08:58:33 -0500

I'm not sure I follow. What's your Puppetfile look like?

All our module repos and control repo have a production branch, so the Puppetfile would have lines that look like:

mod 'module_name',
  :git => 'https://your.gitserver/module_name.git',
  :ref => 'production'

What are you having to edit in the control repo? Are you specifying a commit id or git tag for your module repo? In the example I just put above, if you make changes to your module and push them to the production branch, the Puppetfile in the production branch of the control_repo already knows to deploy the production branch of the module. Because no tag or commit id is specified, it automatically uses the latest commit on that branch,

If you are talking about having to deploy the code on the puppet master, yes you do need to do that, though it is possible to automate the process so whenever a push of new code is done, a deploy is triggered on the puppet master. Puppet has documentation about this.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-27 09:48:24 -0500

Seen: 159 times

Last updated: Aug 07