Skip to content

Commit bbeff72

Browse files
Merge pull request #36 from A1EF/mycelium3
Edited PR from mycelium3
2 parents 847738c + 040c439 commit bbeff72

File tree

12 files changed

+63
-147
lines changed

12 files changed

+63
-147
lines changed

pillar/prod/logrotate.sls

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ logrotate:
105105
- postrotate
106106
- /usr/lib/php/php7.4-fpm-reopenlogs
107107
- endscript
108+
php8.1-fpm:
109+
path:
110+
- /var/log/php8.1-fpm.log
111+
config:
112+
- missingok
113+
- notifempty
114+
- sharedscripts
115+
- postrotate
116+
- /usr/lib/php/php8.1-fpm-reopenlogs
117+
- endscript
108118
salt-common:
109119
path:
110120
- /var/log/salt/master

pillar/prod/php80.sls

Lines changed: 0 additions & 129 deletions
This file was deleted.

pillar/prod/php81.sls

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ php:
1313
cli:
1414
- php8.1-cli
1515
- php8.1-common
16-
xml:
16+
modules:
1717
- php8.1-xml
18+
- php8.1-soap
19+
- php8.1-bcmath
1820

1921
fpm:
2022
conf: /etc/php/8.1/fpm/php-fpm.conf

pillar/prod/users.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ users:
44
www-data:
55
groups:
66
- opensourcewebsite.org
7+
git-auto-deploy:
8+
groups:
9+
- opensourcewebsite.org
710

811
opensourcewebsite.org:
912
fullname: opensourcewebsite org

salt/backup/init.sls

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@
1919
backup_dir: {{ pillar['backup_dir'] }}
2020
backup_site_list: {{ pillar['backup_sites'] | join(' ') }}
2121

22+
#backup-mysql:
23+
# cron.present:
24+
# - name: /root/backup_mysql.sh
25+
# - user: root
26+
# - minute: random
27+
# - hour: 1
28+
# - identifier: backup-mysql
29+
2230
backup-mysql:
23-
cron.present:
31+
cron.absent:
2432
- name: /root/backup_mysql.sh
2533
- user: root
26-
- minute: random
27-
- hour: 1
28-
- identifier: backup-mysql
2934

3035
backup-site:
3136
cron.present:
@@ -35,17 +40,21 @@ backup-site:
3540
- hour: 2
3641
- identifier: backup-site
3742

43+
#{{ pillar['backup_dir'] }}/mysql:
44+
# file.directory:
45+
# - user: root
46+
# - group: root
47+
# - dir_mode: 750
48+
# - file_mode: 640
49+
# - makedirs: True
50+
# - recurse:
51+
# - user
52+
# - group
53+
# - mode
54+
3855
{{ pillar['backup_dir'] }}/mysql:
39-
file.directory:
40-
- user: root
41-
- group: root
42-
- dir_mode: 750
43-
- file_mode: 640
44-
- makedirs: True
45-
- recurse:
46-
- user
47-
- group
48-
- mode
56+
file.absent:
57+
- name: {{ pillar['backup_dir'] }}/mysql
4958

5059
{{ pillar['backup_dir'] }}/sites:
5160
file.directory:

salt/gitautodeploy/files/git-auto-deploy-opensourcewebsite.org.conf.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"http-host": "0.0.0.0",
44
"http-port": 8005,
55
"pid-file": "/www/opensourcewebsite.org/tmp/.gitautodeploy.pid",
6+
"ssl-cert": "/etc/git-auto-deploy/cert.pem",
67

78
"repositories": [{
8-
"url": "git@github.com:opensourcewebsite-org/opensourcewebsite-org.git",
9+
"url": "https://github.com/opensourcewebsite-org/opensourcewebsite-org.git",
910
"branch": "master",
1011
"remote": "origin",
1112
"path": "/www/opensourcewebsite.org/htdocs/",

salt/top.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ base:
1212
- sysctl
1313
- users.log_acl
1414
- update_motd_d
15+
- users.directory
1516
- users.selected_editor
1617
'opensourcewebsite.org or osw-devops-ci':
1718
- match: compound

salt/users/directory.sls

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/www/opensourcewebsite.org/htdocs/:
2+
file.directory:
3+
- mode: 770
4+
- user: opensourcewebsite.org
5+
- group: opensourcewebsite.org
6+
- makedirs: True
7+
8+
/www/opensourcewebsite.org/logs/:
9+
file.directory:
10+
- mode: 770
11+
- user: opensourcewebsite.org
12+
- group: opensourcewebsite.org
13+
- makedirs: True
14+
15+
/www/opensourcewebsite.org/tmp/:
16+
file.directory:
17+
- mode: 770
18+
- user: opensourcewebsite.org
19+
- group: opensourcewebsite.org
20+
- makedirs: True

salt/users/files/opensourcewebsite.org/htdocs/.keep

Whitespace-only changes.

salt/users/files/opensourcewebsite.org/logs/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)