hi, how do i do this with states?

383 views
Skip to first unread message

kosta

unread,
May 21, 2013, 4:37:49 AM5/21/13
to salt-...@googlegroups.com

kosta

unread,
May 21, 2013, 4:40:54 AM5/21/13
to salt-...@googlegroups.com

Colton Myers

unread,
May 23, 2013, 12:13:38 PM5/23/13
to salt-...@googlegroups.com
As far as I know, we don't have an `rpm`-specific state.  We do have state support for handling repos and keys for `yum`, but not specifically for `rpm`.  Someone can correct me if I'm wrong.  =)

We do have an `rpm` module, but after looking over it briefly, it looks like it can only show installed packages, verify packages, and show the contents of packages.  You could create an issue, or you could add to the `rpm` module and create a state yourself!  =D

--
Colton Myers


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

kosta

unread,
May 23, 2013, 1:43:51 PM5/23/13
to salt-...@googlegroups.com
sometimes before i go to sleep , i wish i was a programmer...
then i could write states... :)

thanks

Corey Quinn

unread,
May 23, 2013, 1:52:17 PM5/23/13
to salt-...@googlegroups.com
Let me preface this with "you're doing it wrong." Use yum, that's what it's designed to do, and yum gets pissy if you edit the rpm database outside of yum.

That said, you can hack it:

install-nonsense:
  cmd.run:
    - unless: 'rpm -q zabbixzone-release'

Test obviously, I haven't run this nonsense myself.

kosta

unread,
May 23, 2013, 2:02:20 PM5/23/13
to salt-...@googlegroups.com
thats what i did
just wonted the proper way

there is this thing with yum
pkgrepo wont let me create NEW x.repo file

Corey Quinn

unread,
May 23, 2013, 2:03:14 PM5/23/13
to salt-...@googlegroups.com
Right, I've been dropping the repo files into /etc/yum.repos.d/ like any other file; it works a treat. 

-- Corey

Les Mikesell

unread,
May 23, 2013, 2:21:52 PM5/23/13
to salt-users
On Thu, May 23, 2013 at 1:03 PM, Corey Quinn <co...@sequestered.net> wrote:
> Right, I've been dropping the repo files into /etc/yum.repos.d/ like any
> other file; it works a treat.

I think ideally you'd have a repo_name-release.rpm packaged for each
repo you want to install if the repo itself doesn't provide one. You
might need an out-of-band mechanism to collect and install that
package, though.

--
Les Mikesell
lesmi...@gmail.com

Corey Quinn

unread,
May 23, 2013, 2:30:44 PM5/23/13
to salt-...@googlegroups.com
Right, that gets into something of a chicken and egg problem. :-)

-- Corey

Andrew Niemantsverdriet

unread,
May 23, 2013, 4:24:50 PM5/23/13
to salt-...@googlegroups.com
Just use the file state to put the repo in the /etc/yum.repos.d/ and
again use the file state to install the RPM key (/etc/pki/rpm-gpg/).
Or you could just point the repo file to look online for the key. That
gets a little risky so use your own judgement.
--
_
/-\ ndrew Niemantsverdriet
Linux System Administrator
Academic Computing
(406) 238-7360
Rocky Mountain College
1511 Poly Dr.
Billings MT, 59102
Reply all
Reply to author
Forward
0 new messages