My very first Salt states :)
This commit is contained in:
commit
65c2b869f5
1
salt/srv/pillar/base/motd/init.sls
Normal file
1
salt/srv/pillar/base/motd/init.sls
Normal file
@ -0,0 +1 @@
|
||||
env-name: base
|
7
salt/srv/pillar/base/top.sls
Normal file
7
salt/srv/pillar/base/top.sls
Normal file
@ -0,0 +1,7 @@
|
||||
base:
|
||||
'*':
|
||||
- motd
|
||||
|
||||
prod:
|
||||
'*':
|
||||
- motd
|
15
salt/srv/salt/base/docker/init.sls
Normal file
15
salt/srv/salt/base/docker/init.sls
Normal file
@ -0,0 +1,15 @@
|
||||
Install and start Docker:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- docker.io
|
||||
pip.installed:
|
||||
- name: docker
|
||||
service.running:
|
||||
- name: docker
|
||||
|
||||
{% for vhost,config in pillar["vhosts"].items() %}
|
||||
Create docker network-{{ vhost }}:
|
||||
docker_network.present:
|
||||
- name: network-{{ vhost }}
|
||||
- internal: False
|
||||
{% endfor %}
|
8
salt/srv/salt/base/locale/init.sls
Normal file
8
salt/srv/salt/base/locale/init.sls
Normal file
@ -0,0 +1,8 @@
|
||||
/etc/default/locale: # May be absent
|
||||
file.managed # so create it if any
|
||||
|
||||
en_US.UTF-8:
|
||||
locale.present
|
||||
|
||||
C.UTF-8:
|
||||
locale.system
|
14
salt/srv/salt/base/top.sls
Normal file
14
salt/srv/salt/base/top.sls
Normal file
@ -0,0 +1,14 @@
|
||||
base:
|
||||
'*':
|
||||
- util
|
||||
- locale
|
||||
|
||||
prod:
|
||||
'*':
|
||||
- docker
|
||||
- mariadb
|
||||
- elasticsearch
|
||||
- php-fpm-docker
|
||||
- magento
|
||||
- nginx-docker
|
||||
- memcached-docker
|
7
salt/srv/salt/base/util/init.sls
Normal file
7
salt/srv/salt/base/util/init.sls
Normal file
@ -0,0 +1,7 @@
|
||||
util:
|
||||
pkg.installed:
|
||||
- pkgs:
|
||||
- vim
|
||||
- curl
|
||||
- wget
|
||||
- htop
|
Loading…
Reference in New Issue
Block a user