- No longer using web user to copy static content

+ init.yml now creates web user properly
This commit is contained in:
shockrah 2022-10-21 20:55:52 -07:00
parent 890286b77d
commit a970d344e9
7 changed files with 24 additions and 11 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ playbooks/.env/
playbooks/alpha/searx/settings.yml
playbooks/beta/vars/*.yml
playbooks/env/
playbooks/beta/files/*.pub

View File

View File

@ -14,8 +14,6 @@
state: present
- name: Install Nginx
become: yes
become_method: sudo
apt:
name: nginx
update_cache: yes
@ -42,6 +40,20 @@
comment: Website maintainer account
state: present
- name: Create /home/web/.ssh directory
file:
path: /home/web/.ssh
state: directory
owner: web
group: web
mode: 0700
- name: Copy public web key to beta
authorized_key:
user: web
key: "{{ lookup('file', 'files/'+'web.pub') }}"
- name: Create Web root directory under new web account
file:
path: /var/www

View File

@ -1,6 +1,6 @@
---
- hosts: web
remote_user: web
- hosts: beta
become: yes
tasks:
- name: Push blog content
copy:

View File

@ -1,6 +1,6 @@
---
- hosts: web
remote_user: web
- hosts: beta
become: yes
tasks:
- name: Push docs content
copy:

View File

@ -1,6 +1,6 @@
---
- hosts: web
remote_user: web
- hosts: beta
become: yes
tasks:
- name: Fetch variables from role specific vars file
include_vars:

View File

@ -1,6 +1,6 @@
---
- hosts: web
remote_user: web
- hosts: beta
become: yes
tasks:
- name: Fetch variables from role specific vars file
include_vars: