Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # adhoc cmd for python : raw: dnf install -y python2 python2-dnf libselinux-python
- ---
- - name: install httpd
- hosts: ansible2.example.com
- tasks:
- - name: install pckg
- package:
- name: httpd
- state: present
- - name: create index.html
- copy:
- content: 'httpd successfully running'
- dest: /var/www/html/index.html
- - name: start the service
- service:
- name: httpd
- state: started
- enabled: true
- - name: open firewall
- firewalld:
- service: http
- permanent: yes
- state: enabled
- - name: Check that you can connect (GET) to a page and it returns a status
- uri:
- url: http://localhost/index.html
- return_content: yes
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement