mariadb-service
Example:
# Install the MariaDB database service. - mariadb-service
Description
This frecklet installs the MariaDB service using the geerlingguy.mysql Ansible role.
This frecklet does not do any configuration, and uses all the defaults of the underlying Ansible role. Use other tasks to do any configuration after executing this.
Resources
Variables
Name | Type | Default | Description |
---|---|---|---|
|
integer | -- | An (optional) custom mysql group id |
|
integer | -- | An (optional) custom mysql user id |
Examples
Example 1
Install the MariaDB database service.
Code
- mariadb-service
Code
doc: short_help: Ensures MariaDB service is installed. help: | This frecklet installs the MariaDB service using the [geerlingguy.mysql](https://github.com/geerlingguy/ansible-role-mysql) Ansible role. This frecklet does not do any configuration, and uses all the defaults of the underlying Ansible role. Use other tasks to do any configuration after executing this. references: geerlingguy.mysql Ansible role: https://github.com/geerlingguy/ansible-role-mysql examples: - title: Install the MariaDB database service. args: mysql_group_id: doc: short_help: An (optional) custom mysql group id type: integer required: false mysql_user_id: doc: short_help: An (optional) custom mysql user id type: integer required: false meta: tags: - database - service - mysql - mariadb - featured-frecklecutable - install frecklets: - task: become: true frecklet: name: group type: ansible-module skip: '{{:: mysql_group_id | true_if_empty ::}}' properties: elevated: true idempotent: true internet: true desc: msg: creating mysql group with custom group id references: Ansible 'group' module: http://docs.ansible.com/ansible/latest/group_module.html vars: name: mysql gid: '{{:: mysql_group_id ::}}' - task: become: true frecklet: name: user type: ansible-module skip: '{{:: mysql_user_id | true_if_empty ::}}' properties: idempotent: true elevated: true internet: false desc: short: "create mysql user with custom user id '{{:: mysql_user_id ::}}'" references: Ansible 'user' module: http://docs.ansible.com/ansible/latest/user_module.html vars: name: mysql gid: '{{:: mysql_user_id ::}}' - task: become: true include-type: import frecklet: idempotent: true elevated: true internet: true msg: set up mysql database service references: geerlingguy.mysql Ansible role: https://github.com/geerlingguy/ansible-role-mysql name: geerlingguy.mysql type: ansible-role resources: ansible-role: - geerlingguy.mysql
frecklecute mariadb-service --help Usage: frecklecute mariadb-service [OPTIONS] This frecklet installs the MariaDB service using the [geerlingguy.mysql](https://github.com/geerlingguy/ansible-role-mysql) Ansible role. This frecklet does not do any configuration, and uses all the defaults of the underlying Ansible role. Use other tasks to do any configuration after executing this. Options: --mysql-group-id MYSQL_GROUP_ID An (optional) custom mysql group id --mysql-user-id MYSQL_USER_ID An (optional) custom mysql user id --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.mariadb_service.MariadbService # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class MariadbService(AutoPycklet): """This frecklet installs the MariaDB service using the [geerlingguy.mysql](https://github.com/geerlingguy/ansible-role-mysql) Ansible role. This frecklet does not do any configuration, and uses all the defaults of the underlying Ansible role. Use other tasks to do any configuration after executing this. Args: mysql_group_id: An (optional) custom mysql group id mysql_user_id: An (optional) custom mysql user id """ FRECKLET_ID = "mariadb-service" mysql_group_id: int = None mysql_user_id: int = None def __post_init__(self): super(MariadbService, self).__init__(var_names=["mysql_group_id", "mysql_user_id"]) frecklet_class = MariadbService
# -*- coding: utf-8 -*- # # module path: pycklets.mariadb_service.MariadbService # from pyckles import AutoPycklet class MariadbService(AutoPycklet): """This frecklet installs the MariaDB service using the [geerlingguy.mysql](https://github.com/geerlingguy/ansible-role-mysql) Ansible role. This frecklet does not do any configuration, and uses all the defaults of the underlying Ansible role. Use other tasks to do any configuration after executing this. Args: mysql_group_id: An (optional) custom mysql group id mysql_user_id: An (optional) custom mysql user id """ FRECKLET_ID = "mariadb-service" def __init__(self, mysql_group_id=None, mysql_user_id=None): super(MariadbService, self).__init__(var_names=["mysql_group_id", "mysql_user_id"]) self._mysql_group_id = mysql_group_id self._mysql_user_id = mysql_user_id @property def mysql_group_id(self): return self._mysql_group_id @mysql_group_id.setter def mysql_group_id(self, mysql_group_id): self._mysql_group_id = mysql_group_id @property def mysql_user_id(self): return self._mysql_user_id @mysql_user_id.setter def mysql_user_id(self, mysql_user_id): self._mysql_user_id = mysql_user_id frecklet_class = MariadbService