packages via puppet

29 views
Skip to first unread message

AAB !!

unread,
Oct 16, 2014, 10:02:10 AM10/16/14
to puppet...@googlegroups.com
Hi,
 Could someone tell me how can I answer different questions while installing package via puppet. For example password for mysql-server ? many packages have many questions during installation, how can I answer those when installing them via puppet ?

Secondly,  would the following execute "apt-get update" every time on agent's scheduled execution (runinterval) ? or would it only run for the first time and would not run unless some changes are made to this class file on puppet master ?

       exec {'apt-update':
        command => "/usr/bin/apt-get update",
        require => exec ['apt'],
        }
Actually I can see puppet-agent[2953]: (/Stage[main]/testing-server/Exec[apt-update]/returns) executed successfully after every three minutes (runinterval=180) in the log file (syslog).

Jeremy T. Bouse

unread,
Oct 16, 2014, 5:30:54 PM10/16/14
to puppet...@googlegroups.com
On 10/16/2014 10:02 AM, AAB !! wrote:
> Secondly, would the following execute "apt-get update" every time on
> agent's scheduled execution (runinterval) ? or would it only run for the
> first time and would not run unless some changes are made to this class
> file on puppet master ?
>
> exec {'apt-update':
> command => "/usr/bin/apt-get update",
> require => exec ['apt'],
> }
> Actually I can see *puppet-agent[2953]:
> (/Stage[main]/testing-server/Exec[apt-update]/returns) executed
> successfully *after every three minutes (runinterval=180) in the log
> file (syslog).
>

Yes, your exec block there is telling it to run apt-get update ever
time it does a catalog run. A far better option would be to enable to
unattended upgrades options in the apt module and it should perform this
for you on a regular basis.
Reply all
Reply to author
Forward
0 new messages