From ee39a34fadf93e3bcf0306f430b5bcc39833cc2f Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Tue, 5 Oct 2021 19:13:38 +0000 Subject: [PATCH] Add oci-node hosts --- group_vars/ocinode.yml | 7 +++++++ host_vars/oci-node01.home.foo.sh.yml | 6 ++++++ host_vars/oci-node02.home.foo.sh.yml | 6 ++++++ hosts | 5 +++++ playbooks/oci-node.yml | 13 +++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 group_vars/ocinode.yml create mode 100644 host_vars/oci-node01.home.foo.sh.yml create mode 100644 host_vars/oci-node02.home.foo.sh.yml create mode 100644 playbooks/oci-node.yml diff --git a/group_vars/ocinode.yml b/group_vars/ocinode.yml new file mode 100644 index 0000000..9945015 --- /dev/null +++ b/group_vars/ocinode.yml @@ -0,0 +1,7 @@ +--- +# increase memory size +mem_size: 4192 + +firewall_in: + - {proto: tcp, port: 22, from: [172.20.20.0/22]} + - {proto: tcp, port: 443, from: [172.20.20.0/22]} diff --git a/host_vars/oci-node01.home.foo.sh.yml b/host_vars/oci-node01.home.foo.sh.yml new file mode 100644 index 0000000..0cc5278 --- /dev/null +++ b/host_vars/oci-node01.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:5f diff --git a/host_vars/oci-node02.home.foo.sh.yml b/host_vars/oci-node02.home.foo.sh.yml new file mode 100644 index 0000000..f508957 --- /dev/null +++ b/host_vars/oci-node02.home.foo.sh.yml @@ -0,0 +1,6 @@ +--- +vmhost: vmhost02.home.foo.sh +network_interfaces: + - device: eth0 + vlan: 20 + mac: 52:54:00:ac:dc:60 diff --git a/hosts b/hosts index 9cb5bfc..3c06216 100644 --- a/hosts +++ b/hosts @@ -50,6 +50,10 @@ ns01.home.foo.sh ns02.home.foo.sh atl01.vultr.foo.sh +[ocinode] +oci-node01.home.foo.sh +oci-node02.home.foo.sh + [print] print01.home.foo.sh @@ -118,6 +122,7 @@ mirror munin nas nms +ocinode print shell sqldb diff --git a/playbooks/oci-node.yml b/playbooks/oci-node.yml new file mode 100644 index 0000000..7afceea --- /dev/null +++ b/playbooks/oci-node.yml @@ -0,0 +1,13 @@ +--- +- import_playbook: "include/deploy-kvm-guest.yml myhosts=ocinode" + +- name: configure instance + hosts: ocinode + user: root + gather_facts: true + + vars_files: + - "{{ ansible_private }}/vars.yml" + + roles: + - base