forked from ansible/workshops
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this commit - adds remainder of spanish language links to all readmes for ansible_rhel workshop_type - changes all curls from IP addresses to DNS - adds solution for 1.7
- Loading branch information
Showing
37 changed files
with
157 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
exercises/ansible_rhel/1.7-role/roles/apache_vhost/files/web.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
simple vhost index |
6 changes: 6 additions & 0 deletions
6
exercises/ansible_rhel/1.7-role/roles/apache_vhost/handlers/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
# handlers file for roles/apache_vhost | ||
- name: restart_httpd | ||
service: | ||
name: httpd | ||
state: restarted |
32 changes: 32 additions & 0 deletions
32
exercises/ansible_rhel/1.7-role/roles/apache_vhost/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
# tasks file for roles/apache_vhost | ||
- name: install httpd | ||
yum: | ||
name: httpd | ||
state: latest | ||
|
||
- name: start and enable httpd service | ||
service: | ||
name: httpd | ||
state: started | ||
enabled: true | ||
|
||
- name: ensure vhost directory is present | ||
file: | ||
path: "/var/www/vhosts/{{ ansible_hostname }}" | ||
state: directory | ||
|
||
- name: deliver html content | ||
copy: | ||
src: web.html | ||
dest: "/var/www/vhosts/{{ ansible_hostname }}/index.html" | ||
|
||
- name: template vhost file | ||
template: | ||
src: vhost.conf.j2 | ||
dest: /etc/httpd/conf.d/vhost.conf | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
notify: | ||
- restart_httpd |
15 changes: 15 additions & 0 deletions
15
exercises/ansible_rhel/1.7-role/roles/apache_vhost/templates/vhost.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# {{ ansible_managed }} | ||
|
||
<VirtualHost *:8080> | ||
ServerAdmin webmaster@{{ ansible_fqdn }} | ||
ServerName {{ ansible_fqdn }} | ||
ErrorLog logs/{{ ansible_hostname }}-error.log | ||
CustomLog logs/{{ ansible_hostname }}-common.log common | ||
DocumentRoot /var/www/vhosts/{{ ansible_hostname }}/ | ||
|
||
<Directory /var/www/vhosts/{{ ansible_hostname }}/> | ||
Options +Indexes +FollowSymlinks +Includes | ||
Order allow,deny | ||
Allow from all | ||
</Directory> | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
- name: use apache_vhost role playbook | ||
hosts: node2 | ||
become: yes | ||
|
||
pre_tasks: | ||
- debug: | ||
msg: 'Beginning web server configuration.' | ||
|
||
roles: | ||
- apache_vhost | ||
|
||
post_tasks: | ||
- debug: | ||
msg: 'Web server has been configured.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.