website: Deploy Tabitha's website
Tabihta's website is a very simple, static HTML site. It uploaded via SFTP and served at *tabitha.biz*.
This commit is contained in:
37
roles/websites/tabitha/tasks/main.yml
Normal file
37
roles/websites/tabitha/tasks/main.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
- name: ensure app group exists
|
||||
group:
|
||||
name: webapp.tabitha
|
||||
state: present
|
||||
- name: ensure app user exists
|
||||
user:
|
||||
name: webapp.tabitha
|
||||
group: webapp.tabitha
|
||||
home: /srv/www/tabitha
|
||||
createhome: true
|
||||
state: present
|
||||
|
||||
- name: ensure app home directory permissions are set
|
||||
file:
|
||||
path: /srv/www/tabitha
|
||||
mode: '0755'
|
||||
state: directory
|
||||
|
||||
- name: ensure publisher keys are trusted
|
||||
authorized_key:
|
||||
key: "{{ tabitha_publisher_keys|join('\n') }}"
|
||||
user: webapp.tabitha
|
||||
exclusive: true
|
||||
- name: ensure authorized_keys file permissions are correct
|
||||
file:
|
||||
path: /srv/www/tabitha/.ssh/authorized_keys
|
||||
mode: '0600'
|
||||
owner: webapp.tabitha
|
||||
group: webapp.tabitha
|
||||
setype: ssh_home_t
|
||||
|
||||
- name: ensure apache is configured to serve tabitha.biz
|
||||
copy:
|
||||
src: tabitha.httpd.conf
|
||||
dest: /etc/httpd/conf.d/tabitha.conf
|
||||
mode: '0644'
|
||||
notify: reload httpd
|
||||
Reference in New Issue
Block a user