FAQ
I need to run these commands after a successful install..

rabbitmq-plugins enable rabbitmq_management
rabbitmqctl add_user my-user my-user
rabbitmqctl set_user_tags my-user administrator
service rabbitmq-server restart

What would I add to this definition to run the above commands? (Also I
guess I need a way to ensure it's just run once)

rabbitmq_deb:
   pkgrepo.managed:
     - name: deb http://www.rabbitmq.com/debian/ testing main
     - keyid: 0x056E8E56
     - keyserver: pgp.mit.edu
     - require_in:
       - pkg: rabbitmq-server

rabbitmq-server:
   pkg:
     - installed
     - name: rabbitmq-server
   service:
     - running
     - enable: true
     - watch:
       - pkg: rabbitmq-server

Thanks in advance for any help with this :)

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Justin Vincent at Jul 2, 2014 at 3:13 pm
    Oh I guess it would be something like this..

    # Watch for changes to a git repo and rebuild the project on updatesmy-project:
       git.latest:
         - name: [email protected]/repo/foo
         - target: /opt/foo
         - rev: master
       cmd.wait:
         - name: make install
         - cwd: /opt/foo
         - watch:
           - git: my-project


    On Wednesday, July 2, 2014 8:09:53 AM UTC-7, Justin Vincent wrote:

    I need to run these commands after a successful install..

    rabbitmq-plugins enable rabbitmq_management
    rabbitmqctl add_user my-user my-user
    rabbitmqctl set_user_tags my-user administrator
    service rabbitmq-server restart

    What would I add to this definition to run the above commands? (Also I
    guess I need a way to ensure it's just run once)

    rabbitmq_deb:
    pkgrepo.managed:
    - name: deb http://www.rabbitmq.com/debian/ testing main
    - keyid: 0x056E8E56
    - keyserver: pgp.mit.edu
    - require_in:
    - pkg: rabbitmq-server

    rabbitmq-server:
    pkg:
    - installed
    - name: rabbitmq-server
    service:
    - running
    - enable: true
    - watch:
    - pkg: rabbitmq-server

    Thanks in advance for any help with this :)
    --
    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 [email protected].
    For more options, visit https://groups.google.com/d/optout.
  • Tim Messier at Jul 2, 2014 at 3:18 pm
    You may also want to look into the various rabbitmq states
    <http://docs.saltstack.com/en/latest/ref/states/all/index.html>:

        - rabbitmq_plugin
        <http://docs.saltstack.com/en/latest/ref/states/all/salt.states.rabbitmq_plugin.html#module-salt.states.rabbitmq_plugin>
        - rabbitmq_user
        <http://docs.saltstack.com/en/latest/ref/states/all/salt.states.rabbitmq_user.html#module-salt.states.rabbitmq_user>

    Then have those states require pkg: rabbitmq-server and have service:
    rabbitmq-server watch the plugin and user states.


    On Wed, Jul 2, 2014 at 11:13 AM, Justin Vincent wrote:

    Oh I guess it would be something like this..

    # Watch for changes to a git repo and rebuild the project on updatesmy-project:
    git.latest:
    - name: [email protected]/repo/foo
    - target: /opt/foo
    - rev: master
    cmd.wait:
    - name: make install
    - cwd: /opt/foo
    - watch:
    - git: my-project


    On Wednesday, July 2, 2014 8:09:53 AM UTC-7, Justin Vincent wrote:

    I need to run these commands after a successful install..

    rabbitmq-plugins enable rabbitmq_management
    rabbitmqctl add_user my-user my-user
    rabbitmqctl set_user_tags my-user administrator
    service rabbitmq-server restart

    What would I add to this definition to run the above commands? (Also I
    guess I need a way to ensure it's just run once)

    rabbitmq_deb:
    pkgrepo.managed:
    - name: deb http://www.rabbitmq.com/debian/ testing main
    - keyid: 0x056E8E56
    - keyserver: pgp.mit.edu
    - require_in:
    - pkg: rabbitmq-server

    rabbitmq-server:
    pkg:
    - installed
    - name: rabbitmq-server
    service:
    - running
    - enable: true
    - watch:
    - pkg: rabbitmq-server

    Thanks in advance for any help with this :)
    --
    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 [email protected].
    For more options, visit https://groups.google.com/d/optout.
    --
    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 [email protected].
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedJul 2, '14 at 3:09p
activeJul 2, '14 at 3:18p
posts3
users2

2 users in discussion

Justin Vincent: 2 posts Tim Messier: 1 post

People

Translate

site design / logo © 2023 Grokbase