Add mongodb hosts

This commit is contained in:
Timo Makinen 2022-02-03 21:20:04 +00:00
parent 2cefd6d50d
commit 58eb8c1313
4 changed files with 41 additions and 0 deletions

6
group_vars/mongodb.yml Normal file
View file

@ -0,0 +1,6 @@
---
datadisks:
- 20
firewall_in:
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
- {proto: tcp, port: 27017, from: [172.20.20.0/22]}

View file

@ -0,0 +1,6 @@
---
vmhost: vmhost01.home.foo.sh
network_interfaces:
- device: eth0
vlan: 20
mac: 52:54:00:ac:dc:63

4
hosts
View file

@ -35,6 +35,9 @@ mail02.home.foo.sh
[mirror]
mirror01.home.foo.sh
[mongodb]
mongodb01.home.foo.sh
[munin]
munin01.home.foo.sh
@ -141,6 +144,7 @@ git
jenkins
mail
mirror
mongodb
munin
nas
nms

25
playbooks/mongodb.yml Normal file
View file

@ -0,0 +1,25 @@
---
- import_playbook: "include/deploy-kvm-guest.yml myhosts=mongodb"
- name: configure instance
hosts: mongodb
user: root
gather_facts: true
vars_files:
- "{{ ansible_private }}/vars.yml"
pre_tasks:
- name: mount /export
mount:
name: /export
src: LABEL=/export
fstype: xfs
opts: noatime,noexec,nosuid,nodev
passno: "0"
dump: "0"
state: mounted
roles:
- base
- mongodb