rabbitmq-vhost-user-exists

Description

Create rabbitmq user with full privileges for a specific vhost.

Variables

Name Type Default Description

password

string --

The users password. Required

user

string --

The name of the user. Required

vhost

string --

The vhost name. Required

Code

doc:
  short_help: Create rabbitmq user with full privileges for a specific vhost.

args:
  user:
    doc: The name of the user.
    type: string
    required: true
  password:
    doc: The users password.
    type: string
    required: true
    secret: true
  vhost:
    doc: The vhost name.
    type: string
    required: true

frecklets:
- rabbitmq-vhost-exists:
    name: '{{:: vhost ::}}'
- frecklet:
    name: rabbitmq_user
    type: ansible-module
    properties:
      elevated: true
      idempotent: true
      internet: false
    desc:
      short: "create rabbitmq user '{{:: user ::}}' for vhost '{{:: vhost ::}}'"
  task:
    become: true
  vars:
    user: '{{:: user ::}}'
    password: '{{:: password ::}}'
    vhost: '{{:: vhost ::}}'
    state: present
    configure_priv: .*
    read_priv: .*
    write_priv: .*
frecklecute --community rabbitmq-vhost-user-exists --help

Usage: frecklecute rabbitmq-vhost-user-exists [OPTIONS]

  Create rabbitmq user with full privileges for a specific vhost.

Options:
  --password PASSWORD  The users password.  [required]
  --user USER          The name of the user.  [required]
  --vhost VHOST        The vhost name.  [required]
  --help               Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.rabbitmq_vhost_user_exists.RabbitmqVhostUserExists
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class RabbitmqVhostUserExists(AutoPycklet):
    """Create rabbitmq user with full privileges for a specific vhost.

       Args:
         password: The users password.
         user: The name of the user.
         vhost: The vhost name.

    """

    FRECKLET_ID = "rabbitmq-vhost-user-exists"

    password: str = None
    user: str = None
    vhost: str = None


    def __post_init__(self):
        super(RabbitmqVhostUserExists, self).__init__(var_names=["password", "user", "vhost"])


frecklet_class = RabbitmqVhostUserExists
# -*- coding: utf-8 -*-


#
# module path: pycklets.rabbitmq_vhost_user_exists.RabbitmqVhostUserExists
#


from pyckles import AutoPycklet

class RabbitmqVhostUserExists(AutoPycklet):
    """Create rabbitmq user with full privileges for a specific vhost.

       Args:
         password: The users password.
         user: The name of the user.
         vhost: The vhost name.

    """

    FRECKLET_ID = "rabbitmq-vhost-user-exists"

    def __init__(self, password=None, user=None, vhost=None):

        super(RabbitmqVhostUserExists, self).__init__(var_names=["password", "user", "vhost"])
        self._password = password
        self._user = user
        self._vhost = vhost

    @property
    def password(self):
        return self._password

    @password.setter
    def password(self, password):
        self._password = password

    @property
    def user(self):
        return self._user

    @user.setter
    def user(self, user):
        self._user = user

    @property
    def vhost(self):
        return self._vhost

    @vhost.setter
    def vhost(self, vhost):
        self._vhost = vhost



frecklet_class = RabbitmqVhostUserExists