From eb92f9f7bde107189601b02212ea118fe64bf0ac Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Wed, 26 Aug 2020 23:26:00 +0300 Subject: [PATCH] add adm01.home.foo.sh Temporarily running in vmhost02 --- group_vars/adm.yml | 7 +++++++ host_vars/adm01.home.foo.sh.yml | 3 +++ hosts | 6 ++++++ playbooks/adm.yml | 25 +++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 group_vars/adm.yml create mode 100644 host_vars/adm01.home.foo.sh.yml create mode 100644 playbooks/adm.yml diff --git a/group_vars/adm.yml b/group_vars/adm.yml new file mode 100644 index 0000000..8aa8755 --- /dev/null +++ b/group_vars/adm.yml @@ -0,0 +1,7 @@ +--- + +datadisks: + - 10 + +firewall_in: + - {proto: tcp, port: 22, from: [172.20.20.0/22]} diff --git a/host_vars/adm01.home.foo.sh.yml b/host_vars/adm01.home.foo.sh.yml new file mode 100644 index 0000000..d38b1d2 --- /dev/null +++ b/host_vars/adm01.home.foo.sh.yml @@ -0,0 +1,3 @@ +--- +interfaces: [[20, "52:54:00:ac:dc:0b"]] +vmhost: vmhost02.home.foo.sh diff --git a/hosts b/hosts index abb448f..1dc9cc2 100644 --- a/hosts +++ b/hosts @@ -1,3 +1,6 @@ +[adm] +adm01.home.foo.sh + [mirror] mirror01.home.foo.sh @@ -18,6 +21,9 @@ log01.home.foo.sh proxy01.home.foo.sh proxy02.home.foo.sh +[centos8:children] +adm + [centos7:children] git ldap diff --git a/playbooks/adm.yml b/playbooks/adm.yml new file mode 100644 index 0000000..d75e53f --- /dev/null +++ b/playbooks/adm.yml @@ -0,0 +1,25 @@ +--- +- import_playbook: "include/vm-create.yml myhosts=adm01.home.foo.sh" + +- name: configure instance + hosts: adm + user: root + gather_facts: true + + vars_files: + - /srv/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 + - ansible-host