-
Notifications
You must be signed in to change notification settings - Fork 292
Expand file tree
/
Copy pathmolecule.yml
More file actions
75 lines (75 loc) · 2.25 KB
/
molecule.yml
File metadata and controls
75 lines (75 loc) · 2.25 KB
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
---
dependency:
name: galaxy
driver:
name: docker
lint: |
set -e
yamllint .
ansible-lint .
flake8 library --ignore=E501,E402
platforms:
- name: mongo1
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
groups:
- mongo_master
- name: mongo2
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
groups:
- mongo_replicas
- name: mongo3
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
groups:
- mongo_replicas
provisioner:
name: ansible
config_options:
defaults:
pipelining: true
log: true
playbooks:
converge: ${MOLECULE_PLAYBOOK:-../default/converge.yml}
prepare: ${MOLECULE_PLAYBOOK:-../default/prepare.yml}
env:
MONGODB_VERSION: ${MONGODB_VERSION:-5.0}
MONGODB_PACKAGE: ${MONGODB_PACKAGE:-mongodb-org}
AUTH_STATE: ${AUTH_STATE:-disabled}
REPLICASET: ${REPLICASET:-testrs}
inventory:
host_vars:
mongo1:
ansible_python_interpreter: auto_silent
mongodb_master: true
mongodb_replication_params:
- host_name: "{{ hostvars[inventory_hostname].ansible_default_ipv4.address }}"
mongo2:
ansible_python_interpreter: auto_silent
mongodb_replication_params:
- host_name: "{{ hostvars[inventory_hostname].ansible_default_ipv4.address }}"
mongo3:
ansible_python_interpreter: auto_silent
mongodb_net_port: 30000
mongodb_storage_journal_enabled: "{{ mongodb_major_version is version('4.0', '>=') }}"
mongodb_storage_smallfiles: true
mongodb_storage_prealloc: false
mongodb_replication_params:
- host_name: "{{ hostvars[inventory_hostname].ansible_default_ipv4.address }}"
host_port: "{{ mongodb_net_port }}"
host_type: arbiter
verifier:
name: ansible