dev/provisioning/modules/sysconfig/manifests/sys_upgrade.pp
author ymh <ymh.work@gmail.com>
Fri, 18 Nov 2016 14:48:49 +0100
changeset 428 76a47f714766
parent 28 b0b56e0f8c7f
permissions -rw-r--r--
add memcached configuration option, small corrections for the build process and add installDrupal.sh file to the release

class sysconfig::sys_upgrade {
    package { 'epel':
        name => 'epel-release',
        ensure => present,
    }->
    yumrepo { 'remi':
        descr      => 'Les RPM de remi pour Enterpise Linux $releasever - $basearch',
        mirrorlist => 'http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror',
        gpgcheck   => 1,
        gpgkey     => 'http://rpms.remirepo.net/RPM-GPG-KEY-remi',
        enabled    => 1,
        priority   => 1,
    }->
    exec { "yum-update":
        command => "yum clean all; yum -q -y update",
        timeout => 1800,
        onlyif => "/usr/bin/test `stat --format=%Y /var/lib/yum/rpmdb-indexes` -le $(( `date +%s` - 86400 )) -o ! -e /var/lib/puppet/state/first_run ",
        #onlyif => "/usr/bin/test `stat --format=%Y /var/lib/yum/rpmdb-indexes` -le $(( `date +%s` ))",
        path => [ '/bin', '/usr/bin', '/usr/local/bin' ]
    }
}