Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class subversion {

        $packagelist = ["libsvn1", "subversion"]

        $version = "1.4.6dfsg1-2ubuntu1"
        #$version = "1.6.0-1"

        package { "libsvn1":
                ensure => "$version",
        }
        package { "subversion":
                ensure => "$version",
                require => Package["libsvn1"],
        }

        file { "/etc/subversion/config":
                ensure  => "present",
                source  => "puppet:///subversion/config",
                require => Package["subversion"],
        }
}

testing

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
root@moscow:~# dpkg -l|grep subversion
rc  subversion-tools                      1.6.0-1             Assorted tools related to Subversion

root@moscow:~# puppetd --test --no-daemonize  --verbose
info: Retrieving plugins
notice: Ignoring cache
info: Caching catalog at /var/lib/puppet/state/localconfig.yaml
notice: Starting catalog run
notice: //Node[basenode]/os_ubuntu/apt/Exec[apt-get-update]/returns: executed successfully
notice: //Node[basenode]/os_ubuntu/subversion/Package[libsvn1]/ensure: ensure changed 'purged' to '1.4.6dfsg1-2ubuntu1'
notice: //Node[basenode]/os_ubuntu/subversion/Package[subversion]/ensure: ensure changed 'purged' to '1.4.6dfsg1-2ubuntu1
...
root@moscow:~# dpkg -l|grep subversion
ii  subversion                            1.4.6dfsg1-2ubuntu1         Advanced version control system

note: downgrading does not work.