-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.yml
49 lines (49 loc) · 1.22 KB
/
init.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
- hosts: ghost.live
name: Init del server
tasks:
- name: Mi assicuro che esista il gruppo wheel
group:
name: wheel
state: present
- name: Creo il gruppo demo
group:
name: "{{ group }}"
state: present
- name: Creo utente demo
user:
name: "{{ user }}"
groups: "{{ group }}"
append: yes
shell: /bin/bash
password: "{{ user_password | password_hash('sha512', 'mysecretsalt') }}"
- name: Privilegi sudo
shell: "usermod -aG sudo {{ user }}"
- name: apt update
apt:
update_cache: yes
force_apt_get: yes
cache_valid_time: 3600
- name: Installo i pacchetti
apt:
name: ['curl', 'nginx', 'sudo']
state: present
- name: Scarico il repo nodejs
shell: curl -sL https://deb.nodesource.com/setup_14.x | bash
- name: apt update
apt:
update_cache: yes
force_apt_get: yes
cache_valid_time: 3600
- name: apt upgrade
apt:
upgrade: yes
- name: Installo nodejs
apt:
name: ['nodejs']
state: present
- name: Installo ghost
npm:
name: ghost-cli
global: yes
version: '1.16.3'