-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpillar.example
79 lines (78 loc) · 4.27 KB
/
pillar.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Set firewall status to Active or InActive for the main
# firewall service. If you want to disable the firewall,
# set this to 'InActive' and set the overide firewall
# to Active for the individual applications
firewall:
firewalld:
status: 'Active'
default_zone: 'internal'
# Override host options
# MongoDB docs https://docs.mongodb.com/manual/
mongodb:
lookup:
admin_user: 'admin' # The name of the admin user used if use_security_auth is true
admin_passwd: 'password' # The password of the admin user
database: 'admin' # The database where the user will be created
managed_dbs:
#- database: 'graylog' # The database where the user will be created
# user: 'gluser' # The name of the user to manage
# passwd: 'password' # The password of the user to manage
firewall:
firewalld:
status: 'Active'
package:
{% if grains['os_family'] == 'RedHat' %}
repo_version: '4.0'
repo_baseurl: 'https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/'
repo_gpgkey: 'https://www.mongodb.org/static/pgp/server-4.0.asc'
{% elif grains['os_family'] == 'Debian' %}
repo_version: '4.0'
repo_baseurl: 'deb http://repo.mongodb.org/apt/debian {{ grains.oscodename }}/mongodb-org/4.0 main'
repo_keyserver: 'keyserver.ubuntu.com'
repo_key: '9DA31620334BD75D9DCB49F368818C72E52529D4'
{% endif %}
mongodb:
{% if grains['os_family'] == 'RedHat' %}
storage_dbpath: '/var/lib/mongo' # Define default location for mongo DB path on RHEL systems
{% elif grains['os_family'] == 'Debian' %}
storage_dbpath: '/var/lib/mongodb' # Define default location for mongo DB path on Debian systems
{% endif %}
restart_service_after_state_change: 'true'
use_security_auth: 'true' # Use authentication
security_auth: 'enabled' # Set auth enabled or disabled
use_external_net: 'false' # Use a secondary ip interface
external_net_bindip: '0.0.0.0' # Ex. '{{ grains.ipv4[1] }}, 127.0.0.1' or '0.0.0.0' to listen on all interfaces
local_net_bindip: '127.0.0.1' # If external_net_bindip is set only used for local db creation
use_replica_set: 'false' # Enable replica set states
use_keyfile: 'false' # Enable basic key auth for replica sets
replication_replsetname: 'rs0' # Name of replica set
replication_oplogsizemb: '2048' # Replicaset log file size in MB
keyfile_contents: | # Random key using openssl rand -base64 6-1024
88jRMqGrPjodrPcecSbSVdnqY8bmijul7BK/wLXI40d3YD6vbLpx+jEw3cxJsLKG
FfqVQU9mXdGzEcAtd+uOASOkEiXQy9vAVcFQ08ze5FHgz/p05dlfv6Xb2ETHneoC
V9oNLMMpWwvnePTF/a0iiO36JqZowgaVPQmMho2uJcASVEFwx424Aj+6jei+ZXMH
Hsq+QFPqBf5TOCzzzLfyR8avjc+T1ZnGGtOcQWPP3qK2gx0kLfsM0oFHkD4FG6mi
Cu9W+99K7sgD34HixkNlGkFVLuE8prlPuOIRlXaAdsReEBb9ISA8WSrKHss92jOR
M92WTe16CB2kv8vc5WZQ/w==
sources: # List of sources to use in the replica set
- name: 'mongo00' # name of node
master: 'true' # Master node for deployment, will change after election
arbiter: 'false' # Use this node as an arbiter
ip: '192.168.2.20' # IP address for this node
mask: '/32' # Subnet Mask for this node
fqdn: 'mongo00.alias454.local' # FQDN used in replica set creation can be an IP
port: '27017' # Port used for mongodb on this node
- name: 'mongo01'
master: 'false'
arbiter: 'false'
ip: '192.168.2.19'
mask: '/32'
fqdn: 'mongo01.alias454.local'
port: '27017'
- name: 'mongo02'
master: 'false'
arbiter: 'false'
ip: '192.168.2.21'
mask: '/32'
fqdn: 'mongo02.alias454.local'
port: '27017'