Make more explicit names, make vars for owner and group
This commit is contained in:
parent
f4680dca91
commit
8a97caa5e8
8 changed files with 37 additions and 35 deletions
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
|
||||
- name: "2px directory"
|
||||
- name: "Create 2px directory"
|
||||
file:
|
||||
path: "{{ 2px_directory }}"
|
||||
owner: "flyingscorpio"
|
||||
group: "flyingscorpio"
|
||||
owner: "{{ 2px_owner }}"
|
||||
group: "{{ 2px_group }}"
|
||||
state: directory
|
||||
mode: '0775'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
|
||||
- name: "tunuifranken directory"
|
||||
- name: "Create tunuifranken directory"
|
||||
file:
|
||||
path: "{{ tunuifranken_directory }}"
|
||||
owner: "flyingscorpio"
|
||||
group: "flyingscorpio"
|
||||
owner: "{{ tunuifranken_owner }}"
|
||||
group: "{{ tunuifranken_group }}"
|
||||
state: directory
|
||||
mode: '0775'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
|
||||
- name: apache restart
|
||||
- name: "apache restart"
|
||||
service:
|
||||
name: apache2
|
||||
name: "apache2"
|
||||
state: restarted
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: install apache
|
||||
- name: "Install apache"
|
||||
apt:
|
||||
name: apache2
|
||||
name: "apache2"
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
|
||||
# database names
|
||||
2px_db_name: deux_puissance_x
|
||||
gitea_db_name: giteadb
|
||||
|
||||
# database users and passwords
|
||||
2px_db_user: flyingscorpio
|
||||
# 2px
|
||||
2px_directory: "/var/www/2px"
|
||||
2px_owner: "flyingscorpio"
|
||||
2px_group: "flyingscorpio"
|
||||
2px_db_name: "deux_puissance_x"
|
||||
2px_db_user: "flyingscorpio"
|
||||
2px_db_password: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
66336631303666626239643339643838323463653262656463333166373231303465306238343438
|
||||
|
@ -13,7 +13,15 @@ gitea_db_name: giteadb
|
|||
35306636663830333635653431656430653231633339633561633162333762616134613563646339
|
||||
6631346331363334360a376264613634663065623433623532633930343336346139633931333266
|
||||
61376538656137653730393333356535323330613132346361373465393434306361
|
||||
gitea_db_user: gitea
|
||||
|
||||
# tunuifranken
|
||||
tunuifranken_directory: "/var/www/tunuifranken"
|
||||
tunuifranken_owner: "flyingscorpio"
|
||||
tunuifranken_group: "flyingscorpio"
|
||||
|
||||
# gitea
|
||||
gitea_db_name: "giteadb"
|
||||
gitea_db_user: "gitea"
|
||||
gitea_db_password: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
35643364663730613834303933646532363065636366396264303730303739336462316433333564
|
||||
|
@ -21,9 +29,3 @@ gitea_db_password: !vault |
|
|||
38316339323034323332316239333765393230366138633262366438313935383533363665343566
|
||||
6363326537336333320a363061646361643839666134333061313032316564633766663236366364
|
||||
3138
|
||||
|
||||
# 2px install dir
|
||||
2px_directory: "/var/www/2px"
|
||||
|
||||
# tunuifranken install dir
|
||||
tunuifranken_directory: "/var/www/tunuifranken"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
|
||||
- name: 2px database
|
||||
- name: "Create 2px database"
|
||||
mysql_db:
|
||||
name: "{{ 2px_db_name }}"
|
||||
state: present
|
||||
|
||||
- name: 2px user and privileges
|
||||
- name: "Set 2px user and privileges"
|
||||
mysql_user:
|
||||
name: "{{ 2px_db_user }}"
|
||||
password: "{{ 2px_db_password }}"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: install mariadb
|
||||
- name: "Install mariadb"
|
||||
apt:
|
||||
name: mariadb-server
|
||||
name: "mariadb-server"
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
---
|
||||
|
||||
- name: Add flyingscorpio to the sudo group
|
||||
- name: "Add flyingscorpio to the sudo group"
|
||||
user:
|
||||
name: flyingscorpio
|
||||
name: "flyingscorpio"
|
||||
become: true
|
||||
groups: sudo
|
||||
groups: "sudo"
|
||||
append: yes
|
||||
|
||||
- name: Add flyingscorpio to the wheel group
|
||||
- name: "Add flyingscorpio to the wheel group"
|
||||
user:
|
||||
name: flyingscorpio
|
||||
name: "flyingscorpio"
|
||||
become: true
|
||||
groups: wheel
|
||||
groups: "wheel"
|
||||
append: yes
|
||||
|
||||
- name: Send public SSH key
|
||||
- name: "Send public SSH key"
|
||||
authorized_key:
|
||||
become: true
|
||||
ask-become-pass: true
|
||||
user: flyingscorpio
|
||||
user: "flyingscorpio"
|
||||
state: present
|
||||
key: "{{ lookup("file", "~/.ssh/id_ed25519_lime2.pub") }}"
|
||||
|
|
Loading…
Reference in a new issue