Advertisement
chestnutj2000

lab5jc.yml

Dec 7th, 2020 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. # adhoc cmd for python : raw: dnf install -y python2 python2-dnf libselinux-python
  2. ---
  3. - name: install httpd
  4. hosts: ansible2.example.com
  5. tasks:
  6. - name: install pckg
  7. package:
  8. name: httpd
  9. state: present
  10. - name: create index.html
  11. copy:
  12. content: 'httpd successfully running'
  13. dest: /var/www/html/index.html
  14. - name: start the service
  15. service:
  16. name: httpd
  17. state: started
  18. enabled: true
  19. - name: open firewall
  20. firewalld:
  21. service: http
  22. permanent: yes
  23. state: enabled
  24. - name: Check that you can connect (GET) to a page and it returns a status
  25. uri:
  26. url: http://localhost/index.html
  27. return_content: yes
  28. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement