- 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/alpha/searx/settings.yml
playbooks/beta/vars/*.yml playbooks/beta/vars/*.yml
playbooks/env/ playbooks/env/
playbooks/beta/files/*.pub

View File

View File

@ -14,8 +14,6 @@
state: present state: present
- name: Install Nginx - name: Install Nginx
become: yes
become_method: sudo
apt: apt:
name: nginx name: nginx
update_cache: yes update_cache: yes
@ -42,6 +40,20 @@
comment: Website maintainer account comment: Website maintainer account
state: present 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 - name: Create Web root directory under new web account
file: file:
path: /var/www path: /var/www

View File

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

View File

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

View File

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

View File

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