viernes, 13 de marzo de 2015

Tarea Puppet para crear archivos de pkgsync en Workstations

Como ya sabemos, gestionamos los paquetes instalados en los sistemas mediante pkgsyn, puedes verlo en el siguiente post de Esteban Navas:
http://enavas.blogspot.com.es/2013/12/compartir-la-gestion-de-paquetes.html?m=0

He creado la siguiente tarea para adaptar los workstations a este sistema.
La tarea comprueba que esté instalado el paquete pkgsync y creadas sus carpetas correspondientes, cambia el script pkgsync por el modificado por Esteban Navas para la gestión compartida (.ies), y descarga y mantiene actualizados los ficheros musthave, mayhave y maynothave que nos ponen desde la Consejería y que no podemos modificar.


class   workstation-pkgsync {

package { "pkgsync-workstation-directorio":
name => pkgsync,
ensure => installed,
}

file { "pkgsync-workstation":
path => "/etc/pkgsync",
owner => root, group => root, ensure => directory,
require => Package["pkgsync"],
# before => File[["pkgsync-workstation"],["pkgsync_backup"],["musthave-workstation"],[mayhave-workstation],[maynothave-workstation]],
}

        file { "pkgsync-bin-workstation":
path => "/usr/sbin/pkgsync",
        owner => root, group => root, mode => 755,
        source => "puppet:///modules/workstation-pkgsync/pkgsync",
}
        file { "pkgsync_backup":
path => "/usr/sbin/pkgsync_BACKUP ",
        owner => root, group => root, mode => 644,
        source => "puppet:///modules/workstation-pkgsync/pkgsync_BACKUP",
}
        file { "musthave-workstation":
path => "/etc/pkgsync/musthave",
        owner => root, group => root, mode => 644,
        source => "puppet:///files/workstation-wheezy/musthave",
}

file { "mayhave-workstation":
path => "/etc/pkgsync/mayhave",
owner => root, group => root, mode => 644, 
source => "puppet:///files/workstation-wheezy/mayhave",
#require => File["pkgsync-workstation"],
       }

file { "maynothave-workstation":
path => "/etc/pkgsync/maynothave",
        owner => root, group => root, mode => 644,
source => "puppet:///files/workstation-wheezy/maynothave",
        #require => File["pkgsync-workstation"],
}

}


No hay comentarios:

Publicar un comentario