* Fixing issue with not running tasks with sudo
+ Creating users/groups for web admin operations
This commit is contained in:
parent
52e505fba8
commit
7efec03023
@ -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
|
||||||
tasks:
|
|
||||||
- name: Install snapd package manager
|
|
||||||
become: yes
|
become: yes
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
|
tasks:
|
||||||
|
- name: Install snapd package manager
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user