diff --git a/group_vars/mongodb.yml b/group_vars/mongodb.yml new file mode 100644 index 0000000..2bf3f03 --- /dev/null +++ b/group_vars/mongodb.yml @@ -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]} diff --git a/host_vars/mongodb01.home.foo.sh.yml b/host_vars/mongodb01.home.foo.sh.yml new file mode 100644 index 0000000..4bbd968 --- /dev/null +++ b/host_vars/mongodb01.home.foo.sh.yml @@ -0,0 +1,6 @@ +--- +vmhost: vmhost01.home.foo.sh +network_interfaces: + - device: eth0 + vlan: 20 + mac: 52:54:00:ac:dc:63 diff --git a/hosts b/hosts index 8b6e826..ccae475 100644 --- a/hosts +++ b/hosts @@ -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 diff --git a/playbooks/mongodb.yml b/playbooks/mongodb.yml new file mode 100644 index 0000000..13c0501 --- /dev/null +++ b/playbooks/mongodb.yml @@ -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