websites: Add chmod777.sh
*chmod777.sh* is a simple static website, generated by Hugo. It is built and published from a Jenkins pipeline, which runs automatically when new commits are pushed to Gitea. The HTTPS certificate for this site is signed by Let's Encrypt and managed by `lego` in the `certs` submodule.
This commit is contained in:
53
roles/websites/chmod777.sh/tasks/main.yml
Normal file
53
roles/websites/chmod777.sh/tasks/main.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
- name: ensure rsync is installed
|
||||
package:
|
||||
name: rsync
|
||||
state: present
|
||||
tags:
|
||||
- install
|
||||
|
||||
- name: ensure app group exists
|
||||
group:
|
||||
name: webapp.chmod777
|
||||
state: present
|
||||
- name: ensure app user exists
|
||||
user:
|
||||
name: webapp.chmod777
|
||||
group: webapp.chmod777
|
||||
home: /srv/www/chmod777.sh
|
||||
createhome: yes
|
||||
state: present
|
||||
|
||||
- name: ensure app home directory permissions are set
|
||||
file:
|
||||
path: /srv/www/chmod777.sh
|
||||
mode: '0755'
|
||||
state: directory
|
||||
|
||||
- name: ensure app ssh home directory exists
|
||||
file:
|
||||
path: /srv/www/chmod777.sh/.ssh
|
||||
mode: '0700'
|
||||
owner: webapp.chmod777
|
||||
group: webapp.chmod777
|
||||
setype: ssh_home_t
|
||||
- name: ensure publisher keys are trusted
|
||||
authorized_key:
|
||||
key: "{{ chmod777_publisher_keys|join('\n') }}"
|
||||
user: webapp.chmod777
|
||||
exclusive: true
|
||||
- name: ensure authorized keys file permissions are correct
|
||||
file:
|
||||
path: /srv/www/chmod777.sh/.ssh/authorized_keys
|
||||
mode: '0600'
|
||||
owner: webapp.chmod777
|
||||
group: webapp.chmod777
|
||||
setype: ssh_home_t
|
||||
|
||||
- name: ensure apache is configured to serve chmod777.sh
|
||||
copy:
|
||||
src: chmod777.sh.httpd.conf
|
||||
dest: /etc/httpd/conf.d/chmod777.sh.conf
|
||||
mode: '0644'
|
||||
notify: reload httpd
|
||||
tags:
|
||||
- httpd-config
|
||||
Reference in New Issue
Block a user