From 7947de20d5014edcf04c6a4c3ab781de07b17a8f Mon Sep 17 00:00:00 2001 From: Aleksei Slaikovskii Date: Wed, 14 Mar 2018 11:50:06 +0100 Subject: [PATCH] Ensure firewalld is installed and configured Now runner preparation does not configure firewalld service and open ports for NFS related services. As the result Vagrant can't mount NFS directory so no task will be run. This patch eliminates this kind of thing. --- ansible/roles/runner/tasks/setup.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ansible/roles/runner/tasks/setup.yml b/ansible/roles/runner/tasks/setup.yml index a6ded665..f71d908a 100644 --- a/ansible/roles/runner/tasks/setup.yml +++ b/ansible/roles/runner/tasks/setup.yml @@ -26,6 +26,7 @@ - createrepo - gzip - gcc + - firewalld - python3-devel - python3-pip - redhat-rpm-config @@ -39,9 +40,31 @@ - python3-tqdm - python3-pytz - python3-jinja2 + - python-firewall + - python3-firewall notify: - restart_nfs +- name: enable firewalld + service: + name: firewalld + enabled: true + state: started + +- name: configure firewalld + firewalld: + service : "{{ item }}" + permanent: true + state: enabled + with_items: + - nfs + - ipp + - rpc-bind + - mountd + +- name: reload firewalld + shell: firewall-cmd --reload + - name: start&enable nfs service: name: nfs