* Fixing issue with not running tasks with sudo

+ Creating users/groups for web admin operations
This commit is contained in:
shockrah 2021-12-11 17:54:20 -08:00
parent 52e505fba8
commit 7efec03023

View File

@ -1,10 +1,13 @@
# 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 - hosts: beta
remote_user: ubuntu remote_user: ubuntu
become: yes
become_method: sudo
tasks: tasks:
- name: Install snapd package manager - name: Install snapd package manager
become: yes
become_method: sudo
apt: apt:
name: snapd name: snapd
update_cache: yes update_cache: yes
@ -28,5 +31,24 @@
name: certbot name: certbot
classic: yes 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