--- - name: Enable intranet services hosts: servera.lab.example.com become: true tasks: - name: latest version of httpd and firewalld installed yum: name: - httpd - firewalld state: latest - name: test html page is installed copy: content: "Welcome to the example.com intranet!\n" dest: /var/www/html/index.html - name: firewalld enabled and running service: name: firewalld state: started enabled: true - name: firewalld permits acccess to httpd service firewalld: service: http permanent: true state: enabled immediate: true - name: httpd enabled and running service: name: httpd state: started enabled: true - name: Test intranet web server hosts: localhost become: no tasks: - name: connect to the intranet service uri: url: http://servera.lab.example.com return_content: yes status_code: 200