Ask Your Question
0

vcsrepo and file to run only if git has a newer revision

asked 2016-04-05 13:38:11 -0500

mrdeshapiro gravatar image

vcsrepo runs even if latest already present. How do I get both stanzas to run only if latest not present?

  vcsrepo { "$odbcini_src":
    ensure   => latest,
    provider => git,
    source   => "$odbcini_repo",
    force    => true,
}

file { "$odbcini_dst":
    ensure => file,
    owner  => "root",
    group  => "root",
    source => "${odbcini_src}/odbc.ini.GOLD",
    mode   => '0644',
}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-04-19 10:59:50 -0500

awippler gravatar image

Remove force => true from vcsrepo.

vcsrepo will only pull if there is a newer code in the repository. You are basically forcing the repo to pull every time. Puppet will compare the md5sum of the file resource and update when necessary.

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: 2016-04-05 13:36:19 -0500

Seen: 103 times

Last updated: Apr 19 '16