websites: Add role for nratonpass.com

The *websites/nratonpass.com* role prepares a machine to host
http://nratonpass.com/. The website itself is published via rsync by
Jenkins.
jenkins-master
Dustin 2018-07-29 09:34:21 -05:00
parent ae5d8bee56
commit 1f16b4c3e4
3 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<VirtualHost _default_:80>
ServerName nratonpass.com
ServerAlias www.nratonpass.com
DocumentRoot /srv/www/nratonpass.com/htdocs
<Directory /srv/www/nratonpass.com/htdocs>
Require all granted
</Directory>
</VirtualHost>

View File

@ -0,0 +1,4 @@
- name: reload httpd
service:
name=httpd
state=reloaded

View File

@ -0,0 +1,37 @@
- name: ensure rsync is installed
package:
name=rsync
state=present
tags:
- install
- name: ensure app group exists
group:
name=webapp.nratonpass
state=present
- name: ensure app user exists
user:
name=webapp.nratonpass
group=webapp.nratonpass
home=/srv/www/nratonpass.com
createhome=yes
state=present
- name: ensure app home directory permissions are set
file:
path=/srv/www/nratonpass.com
mode=0755
state=directory
- name: ensure publisher keys are trusted
authorized_key:
key: "{{ nratonpass_publisher_keys|join('\n') }}"
user: webapp.nratonpass
exclusive: true
- name: ensure apache is configured to serve nratonpass.com
copy:
src=nratonpass.com.httpd.conf
dest=/etc/httpd/conf.d/nratonpass.com.conf
mode=0644
notify: reload httpd