7efec03023
+ Creating users/groups for web admin operations
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
# This playbook goes through the process of setting up all the lower level
|
|
# infrastructure we need to start deploying website files to the server
|
|
# itself.
|
|
---
|
|
- hosts: beta
|
|
remote_user: ubuntu
|
|
become: yes
|
|
become_method: sudo
|
|
tasks:
|
|
- name: Install snapd package manager
|
|
apt:
|
|
name: snapd
|
|
update_cache: yes
|
|
state: present
|
|
|
|
- name: Install Nginx
|
|
become: yes
|
|
become_method: sudo
|
|
apt:
|
|
name: nginx
|
|
update_cache: yes
|
|
state: present
|
|
|
|
- name: Update Snap
|
|
community.general.snap:
|
|
name: core
|
|
state: present
|
|
|
|
- name: Install Certbot Snap Package
|
|
community.general.snap:
|
|
name: certbot
|
|
classic: yes
|
|
|
|
- name: Create website admin group
|
|
group:
|
|
name: web
|
|
state: present
|
|
|
|
- name: Create website user account
|
|
user:
|
|
name: web
|
|
comment: Website maintainer account
|
|
state: present
|
|
|
|
- name: Create Web root directory under new web account
|
|
file:
|
|
path: /var/www
|
|
state: directory
|
|
recurse: yes
|
|
owner: web
|
|
group: web
|
|
|
|
|
|
|