-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
Hi,
Let me know if this could be usable for a pull request.
I added a generation of the configuration file (/etc/db/db.conf).
The file contains a machine IP address, server role (master/slave) etc..., this informations could be used by some administration script (provided by you, for example, which changing roles of master and slave instances, or doing backup etc... ).
The db.conf.jinja:
<redis>
<user>{{ salt['pillar.get']('redis:dbconf:user', '') }}</user>
<password>{{ salt['pillar.get']('redis:dbconf:password', '') }}</password>
<backup>{{ salt['pillar.get']('redis:dbconf:backup', '') }}</backup>
<master_ip>{{ salt['pillar.get']('redis:dbconf:master_ip', '') }}</master_ip>
<master_netmask>{{ salt['pillar.get']('redis:dbconf:master_netmask', '') }}</master_netmask>
<hardwar_ip>{{ salt['pillar.get']('redis:dbconf:hardwar_ip', '') }}</hardwar_ip>
<hardwar_mask>{{ salt['pillar.get']('redis:dbconf:hardwar_mask', '') }}</hardwar_mask>
<role>{{ salt['pillar.get']('redis:dbconf:role', '') }}</role>
</redis>
and you can define the variables via pillar:
dbconf:
user: admin666
master_ip: 123.123.123.123
Technically, there are only a few modifications in the original formula code.
Metadata
Metadata
Assignees
Labels
No labels