diff --git a/lamp_simple/roles/web/tasks/install_httpd.yml b/lamp_simple/roles/web/tasks/install_httpd.yml index f0d3fb6..88ca402 100644 --- a/lamp_simple/roles/web/tasks/install_httpd.yml +++ b/lamp_simple/roles/web/tasks/install_httpd.yml @@ -12,7 +12,7 @@ - libselinux-python - name: insert iptables rule for httpd - lineinfile: dest=/etc/sysconfig/iptables state=present regexp="{{ httpd_port }}" insertafter="^:OUTPUT " + lineinfile: dest=/etc/sysconfig/iptables create=yes state=present regexp="{{ httpd_port }}" insertafter="^:OUTPUT " line="-A INPUT -p tcp --dport {{ httpd_port }} -j ACCEPT" notify: restart iptables