Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: web
- become: yes
- handlers:
- - name: Restart Apache
- service:
- name: httpd
- state: restarted
- listen: "Restart Apache"
- tasks:
- - name: Install httpd
- yum:
- name: httpd
- state: present
- - name: Enable Service httpd
- service:
- name: httpd
- state: started
- enabled: yes
- - name: Configure Website
- lineinfile:
- path: /etc/httpd/conf/httpd.conf
- line: "ServerName repo.example.com:80"
- line: "DocumentRoot /var/www/html/repo.example.com"
- line: "NameVirtualHost 13.233.214.40:80"
- when:
- - ansible_hostname == "sv515c"
- notify: "Restart Apache"
- - name: Website.tgz
- get_url:
- url: http://repo.example.com
- dest: /tmp/website.tgz
Add Comment
Please, Sign In to add comment