Take a look at the package resource.
https://puppet.com/docs/puppet/latest/types/package.html 
<https://puppet.com/docs/puppet/latest/types/package.html>
Additionally if the source is not a configured repo, then you may want to use 
the source attribute of the package repo.


-- 
Becca Robinson




> On Nov 20, 2019, at 8:15 PM, Reth Kevin Bagares 
> <[email protected]> wrote:
> 
> How can I install a .deb file in a puppet custom module?
> 
> I want to run this command in a puppet
> 
> ```
> wget https://repo.percona.com/apt/percona-release_0.1-6.$(lsb_release 
> -sc)_all.deb 
> sudo dpkg -i percona-release_0.1-6.$(lsb_release -sc)_all.deb
> sudo apt-get update
> sudo apt-get install percona-xtradb-cluster-full-57
> ```
> and this is my current percona.pp
> 
> ```
> class percona {
> 
>     exec{'percona_deb':
>       command => "/usr/bin/wget -q 
> https://repo.percona.com/apt/percona-release_0.1-6.$(lsb_release -sc)_all.deb 
> -O /tmp/percona-re$
>       creates => "/tmp/percona-release_0.1-6.$(lsb_release -sc)_all.deb",
>     }
> }
> ```
> 
> running the script in agent `/opt/puppetlabs/bin/puppet agent --test` will 
> download the .deb file
> 
> 
> Disclaimer: This message contains confidential information and is intended 
> only for the individual named. If you are not the named addressee you should 
> not disseminate, distribute or copy this e-mail. Please notify the sender 
> immediately by e-mail if you have received this e-mail by mistake and delete 
> this e-mail from your system. E-mail transmission cannot be guaranteed to be 
> secure or error-free as information could be intercepted, corrupted, lost, 
> destroyed, arrive late or incomplete, or contain viruses. The sender 
> therefore does not accept liability for any errors or omissions in the 
> contents of this message, which arise as a result of e-mail transmission. If 
> verification is required please request a hard-copy version. 
> https://fligno.com <https://fligno.com/>
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/bb523251-94cc-4d00-b0e4-d4bf68139bce%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/bb523251-94cc-4d00-b0e4-d4bf68139bce%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1D764A2C-1F78-4F1B-9DB6-2772FADB6793%40puppet.com.

Reply via email to