From 3ec1481938fc048b65e968a9598997b8a01604c9 Mon Sep 17 00:00:00 2001 From: Marcos Entenza <mak@redhat.com> Date: Sun, 16 Feb 2020 10:01:40 +0100 Subject: [PATCH] Add Satellite, SAP Software and more customization (#1155) --- ansible/configs/sap-hana/software.yml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 53 insertions(+), 4 deletions(-) diff --git a/ansible/configs/sap-hana/software.yml b/ansible/configs/sap-hana/software.yml index ec7fa8e..cb29f1e 100644 --- a/ansible/configs/sap-hana/software.yml +++ b/ansible/configs/sap-hana/software.yml @@ -7,14 +7,63 @@ - debug: msg: "Software tasks Started" -- name: Install and configure NFS Server +- name: Ensure NFS Server is installed, SAP Software Device Mounted and Ansible Installed hosts: bastion become: True gather_facts: True - roles: - # Install and deloy NFS Server - - { role: "host-ocp-nfs", when: install_nfs } tasks: + + - name: Ensure NFS directory exists + file: + path: "/nfs" + state: directory + + - name: Mount up device by UUID + mount: + path: /nfs + src: /dev/vdb + fstype: xfs + state: present + + - name: 'Ensure required packages are installed' + package: + name: '{{ item }}' + state: installed + with_items: + - nfs-utils + - firewalld + + - name: 'Ensure firewalld is running' + service: + name: firewalld + state: started + enabled: yes + + - name: 'Open Firewall for NFS use' + firewalld: + port: "{{ item }}" + permanent: yes + state: enabled + immediate: yes + with_items: + - 111/tcp + - 111/udp + - 2049/tcp + - 2049/udp + + - name: "Ensure export file contains the directory to be shared" + lineinfile: + path: /etc/exports + state: present + regexp: "^/nfs" + line: "/nfs *(insecure,rw,root_squash,no_wdelay,sync)" + + - name: 'Ensure nfs-server is restarted and running' + service: + name: nfs-server + state: restarted + enabled: yes + - name: Ensure Ansible is installed yum: name: ansible -- Gitblit v1.9.3