- No longer using web user to copy static content
+ init.yml now creates web user properly
This commit is contained in:
parent
890286b77d
commit
a970d344e9
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ playbooks/.env/
|
||||
playbooks/alpha/searx/settings.yml
|
||||
playbooks/beta/vars/*.yml
|
||||
playbooks/env/
|
||||
playbooks/beta/files/*.pub
|
||||
|
0
playbooks/beta/files/.gitkeep
Normal file
0
playbooks/beta/files/.gitkeep
Normal 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- hosts: web
|
||||
remote_user: web
|
||||
- hosts: beta
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Push blog content
|
||||
copy:
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- hosts: web
|
||||
remote_user: web
|
||||
- hosts: beta
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Push docs content
|
||||
copy:
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- hosts: web
|
||||
remote_user: web
|
||||
- hosts: beta
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Fetch variables from role specific vars file
|
||||
include_vars:
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- hosts: web
|
||||
remote_user: web
|
||||
- hosts: beta
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Fetch variables from role specific vars file
|
||||
include_vars:
|
||||
|
Loading…
Reference in New Issue
Block a user