- 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/alpha/searx/settings.yml
|
||||||
playbooks/beta/vars/*.yml
|
playbooks/beta/vars/*.yml
|
||||||
playbooks/env/
|
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
|
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
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user