Skip to content

Commit c09c531

Browse files
committed
Enable salt state
1 parent 6fed2d4 commit c09c531

File tree

16 files changed

+60
-186
lines changed

16 files changed

+60
-186
lines changed

.github/workflows/kitchen.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,9 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
instance:
23-
# - default-ubuntu-2204-tiamat-py3
24-
# - default-ubuntu-2004-tiamat-py3
25-
# - default-ubuntu-1804-tiamat-py3
26-
# - default-ubuntu-2204-master-py3
23+
- default-ubuntu-2204-master-py3
2724
- default-ubuntu-2004-master-py3
2825
- default-ubuntu-1804-master-py3
29-
# - default-ubuntu-2204-3004-1-py3
30-
- default-ubuntu-2004-3004-1-py3
31-
- default-ubuntu-1804-3004-1-py3
32-
- default-ubuntu-2004-3003-4-py3
33-
- default-ubuntu-1804-3003-4-py3
3426
steps:
3527
- name: 'Check out code'
3628
uses: 'actions/checkout@v2'
@@ -43,7 +35,7 @@ jobs:
4335
- name: 'Install Bundler'
4436
run: |
4537
sudo gem install bundler \
46-
-v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)" \
38+
-v "$(grep -A 1 'BUNDLED WITH' Gemfile.lock | tail -n 1)" \
4739
--quiet --no-document
4840
- name: 'Run Bundler'
4941
run: |

INSTALL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Please read through our [Contributing Guidelines](CONTRIBUTING.md).
44

55
## General server setup
66

7-
- Run `sudo wget -L https://raw.githubusercontent.com/opensourcewebsite-org/osw-devops/master/install.sh` to download install script.
8-
- Run `sudo sh install.sh` to install initial environment.
7+
- Run `wget https://raw.githubusercontent.com/opensourcewebsite-org/osw-devops/master/install.sh` to download install script.
8+
- Run `sudo bash install.sh` to install initial environment.
99
- Put user password's hash in `/srv/users-passwords.txt`.
1010
- Run `sudo salt '*' state.apply --state-verbose=false`.
1111
- Replace `<SetYourAPIKey>` to your own [SendGrid API key](https://app.sendgrid.com/settings/api_keys) in `/etc/exim4/passwd.client` and run `systemctl restart exim4`

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ gitfs_remotes:
4242
- root: salt
4343
4444
pillarenv_from_saltenv: True
45-
git_pillar_root: pillar
4645
ext_pillar:
4746
- git:
4847
- https://github.com/opensourcewebsite-org/osw-devops.git
48+
- root: pillar
4949
EOF
5050

51-
salt-pip install GitPython pygit2
51+
salt-pip install GitPython
5252

5353
systemctl restart salt-master
5454

kitchen.yml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,6 @@ provisioner:
4444
- https://github.com/saltstack-formulas/logrotate-formula.git
4545

4646
platforms:
47-
## SALT `tiamat`
48-
- name: ubuntu-2204-tiamat-py3
49-
driver:
50-
image: saltimages/salt-tiamat-py3:ubuntu-22.04
51-
run_command: /lib/systemd/systemd
52-
- name: ubuntu-2004-tiamat-py3
53-
driver:
54-
image: saltimages/salt-tiamat-py3:ubuntu-20.04
55-
run_command: /lib/systemd/systemd
56-
- name: ubuntu-1804-tiamat-py3
57-
driver:
58-
image: saltimages/salt-tiamat-py3:ubuntu-18.04
59-
run_command: /lib/systemd/systemd
60-
6147
## SALT `master`
6248
- name: ubuntu-2204-master-py3
6349
driver:
@@ -72,30 +58,6 @@ platforms:
7258
image: saltimages/salt-master-py3:ubuntu-18.04
7359
run_command: /lib/systemd/systemd
7460

75-
## SALT `3004.1`
76-
- name: ubuntu-2204-3004-1-py3
77-
driver:
78-
image: saltimages/salt-3004.1-py3:ubuntu-22.04
79-
run_command: /lib/systemd/systemd
80-
- name: ubuntu-2004-3004-1-py3
81-
driver:
82-
image: saltimages/salt-3004.1-py3:ubuntu-20.04
83-
run_command: /lib/systemd/systemd
84-
- name: ubuntu-1804-3004-1-py3
85-
driver:
86-
image: saltimages/salt-3004.1-py3:ubuntu-18.04
87-
run_command: /lib/systemd/systemd
88-
89-
## SALT `3003.4`
90-
- name: ubuntu-2004-3003-4-py3
91-
driver:
92-
image: saltimages/salt-3003.4-py3:ubuntu-20.04
93-
run_command: /lib/systemd/systemd
94-
- name: ubuntu-1804-3003-4-py3
95-
driver:
96-
image: saltimages/salt-3003.4-py3:ubuntu-18.04
97-
run_command: /lib/systemd/systemd
98-
9961
verifier:
10062
# https://www.inspec.io/
10163
name: inspec

pillar/prod/nginx.sls

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# vim: ft=yaml
22
---
33
nginx:
4-
# pkg:
5-
# - installed
6-
# service:
7-
# - running
8-
# - reload: True
9-
# - require:
10-
# - pkg: nginx
11-
install_from_ppa: true
4+
install_from_repo: true
5+
6+
install_from_phusionpassenger: false
7+
8+
install_from_ppa: false
129
ppa_version: 'stable'
1310

1411
lookup:

pillar/prod/salt.sls

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,35 @@ salt:
66
master_remove_config: false
77
install_packages: true
88
py_ver: 'py3'
9-
version: 3004
9+
version: 3005.1+ds-2
10+
release: '3005.1'
1011
lookup:
1112
salt_master: 'salt-master'
1213
salt_minion: 'salt-minion'
13-
release: '3004'
1414
master:
15-
fileserver_backend:
16-
- git
17-
- roots
18-
file_roots:
19-
base:
20-
- /srv/salt
21-
pillar_roots:
22-
base:
23-
- /srv/pillar
15+
fileserver_backend: git
16+
gitfs_provider: gitpython
17+
gitfs_update_interval: 63072000
2418
gitfs_remotes:
25-
- https://github.com/saltstack-formulas/salt-formula.git:
26-
- base: master
27-
- https://github.com/saltstack-formulas/cron-formula.git:
28-
- base: master
29-
- https://github.com/saltstack-formulas/nginx-formula.git:
30-
- base: master
31-
- https://github.com/saltstack-formulas/php-formula.git:
32-
- base: master
33-
- https://github.com/saltstack-formulas/supervisor-formula.git:
34-
- base: master
35-
- https://github.com/saltstack-formulas/users-formula.git:
36-
- base: master
37-
- https://github.com/saltstack-formulas/logrotate-formula.git:
38-
- base: master
19+
- https://github.com/saltstack-formulas/salt-formula.git
20+
- https://github.com/saltstack-formulas/cron-formula.git
21+
- https://github.com/saltstack-formulas/nginx-formula.git
22+
- https://github.com/saltstack-formulas/php-formula.git
23+
- https://github.com/saltstack-formulas/supervisor-formula.git
24+
- https://github.com/saltstack-formulas/users-formula.git
25+
- https://github.com/saltstack-formulas/logrotate-formula.git
3926
- https://github.com/opensourcewebsite-org/osw-devops.git:
4027
- root: salt
41-
- base: master
42-
top_file_merging_strategy: merge
43-
gitfs_provider: gitpython
4428
git_pillar_provider: gitpython
4529
gitfs_saltenv_whitelist:
4630
- base
47-
git_pillar_env: base
31+
pillarenv_from_saltenv: true
4832
git_pillar_root: pillar
49-
gitfs_update_interval: 63072000
50-
roots_update_interval: 63072000
5133
ext_pillar:
5234
- git:
53-
- master https://github.com/opensourcewebsite-org/osw-devops.git:
54-
- root: pillar
35+
- master https://github.com/opensourcewebsite-org/osw-devops.git
36+
37+
5538
minion:
5639
master: 127.0.0.1
5740
# schedule:

pillar/salt.sls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ salt:
66
master_remove_config: false
77
install_packages: true
88
py_ver: 'py3'
9-
version: 3004
9+
version: 3005.1+ds-2
10+
release: '3005.1'
1011
lookup:
1112
salt_minion: 'salt-minion'
12-
release: '3004'
1313
minion:
1414
master: 127.0.0.1
1515
# schedule:

pillar/top.sls

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
base:
77
'*':
88
- users.init
9+
'* and not osw-devops-ci':
10+
- match: compound
911
- salt
1012
'opensourcewebsite.org or osw-devops-ci':
1113
- match: compound
@@ -16,8 +18,9 @@ base:
1618
- prod.composer
1719
- prod.backup
1820
- prod.logrotate
19-
- prod.salt
2021
- prod.exim
22+
'opensourcewebsite.org':
23+
- prod.salt
2124
'osw-devops-ci':
2225
# Overrides for Kitchen testing
2326
- test.nginx

salt/auditd/init.sls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
audispd-plugins:
2727
pkg.installed
2828
29+
{% if grains['oscodename'] in ['bionic', 'focal'] %}
2930
/etc/audisp/plugins.d/syslog.conf:
31+
{% else %}
32+
/etc/audit/plugins.d/syslog.conf:
33+
{% endif %}
3034
file.replace:
3135
- pattern: active = no
3236
- repl: active = yes

salt/docker/init.sls

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

0 commit comments

Comments
 (0)