Puppet : Install a .deb

154 views
Skip to first unread message

Reth Kevin Bagares

unread,
Nov 21, 2019, 10:49:17 AM11/21/19
to Puppet Users
How can I install a .deb file in a puppet custom module?

I want to run this command in a puppet

```
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

Becca Robinson

unread,
Nov 21, 2019, 11:03:29 AM11/21/19
to puppet...@googlegroups.com
Take a look at the package resource.
Additionally if the source is not a configured repo, then you may want to use the source attribute of the package repo.


-- 
Becca Robinson




--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bb523251-94cc-4d00-b0e4-d4bf68139bce%40googlegroups.com.

Dirk Heinrichs

unread,
Nov 22, 2019, 1:31:17 AM11/22/19
to puppet...@googlegroups.com
Am Donnerstag, den 21.11.2019, 10:03 -0600 schrieb Becca Robinson:

Take a look at the package resource.
Additionally if the source is not a configured repo, then you may want to use the source attribute of the package repo.

And, on top of that, you might want to also install the "puppetlabs-apt" module from the Puppet Forge to be able to manage package repositories and apt configuration.

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
Reply all
Reply to author
Forward
0 new messages