configpolicy/roles/websites/hatchlearningcenter.org/tasks/main.yml

52 lines
1.1 KiB
YAML

- name: ensure app group exists
group:
name: webapp.hlc
state: present
tags:
- group
- user
- name: ensure app user exists
user:
name: webapp.hlc
group: webapp.hlc
home: /srv/www/hatchlearningcenter.org
createhome: true
state: present
tags:
- user
- name: ensure app home directory permissions are set
file:
path: /srv/www/hatchlearningcenter.org
mode: u=rwx,go=rx
state: directory
tags:
- datadir
- name: ensure publisher keys are trusted
authorized_key:
key: "{{ hlc_publisher_keys|join('\n') }}"
user: webapp.hlc
exclusive: true
tags:
- sshkey
- name: ensure authorized_keys file permissions are correct
file:
path: /srv/www/hatchlearningcenter.org/.ssh/authorized_keys
mode: u=rw,go=
owner: webapp.hlc
group: webapp.hlc
setype: ssh_home_t
tags:
- sshkey
- name: ensure apache is configured to serve hatchlearningcenter.org
copy:
src: hatchlearningcenter.org.httpd.conf
dest: /etc/httpd/conf.d/hatchlearningcenter.org.conf
mode: u=rw,go=r
notify: reload httpd
tags:
- apache-config