Compare commits
No commits in common. "170e42890560901e44c67480e3e93d4b76fe3883" and "512f1c30ab890b309755bc30d0d738cf14bc5bd0" have entirely different histories.
170e428905
...
512f1c30ab
19 changed files with 189 additions and 113 deletions
|
@ -1 +0,0 @@
|
|||
{%- set roles=salt.cmd.shell("grep -Po '(?<=- ).*' /srv/salt/"+saltenv+"/pillars/servers/roles/server/"+grains['host']+".sls").split('\n') -%}
|
|
@ -1,20 +1,21 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.aurpkgs.none
|
||||
{%- if roles is not none -%}
|
||||
{%- if 'aurrepo' in roles -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.aurpkgs.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- if 'aurrepo' in grains['roles'] -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.aurpkgs.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
- roles.aurpkgs.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.aurpkgs.'+role in states %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.aurpkgs.'+role in states %}
|
||||
- roles.aurpkgs.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.backup.none
|
||||
{%- if roles is not none -%}
|
||||
{%- if 'backup' in roles -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.backup.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- if 'backup' in grains['roles'] -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.backup.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
- roles.backup.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.backup.'+role in states %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.backup.'+role in states %}
|
||||
- roles.backup.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.ca.none
|
||||
{%- if roles is not none -%}
|
||||
{%- if 'ca' in roles -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.ca.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- if 'ca' in grains['roles'] -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.ca.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
- roles.ca.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.ca.'+role in states %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.ca.'+role in states %}
|
||||
- roles.ca.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.database.none
|
||||
{%- if roles is not none -%}
|
||||
{%- if 'mysql' in roles -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.database.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- if 'mysql' in grains['roles'] -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.database.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
- roles.database.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.firewalld.core
|
||||
|
||||
{%- if roles is not none -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.firewalld.'+role in states %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.firewalld.'+role in states %}
|
||||
- roles.firewalld.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.git.none
|
||||
|
||||
{%- if roles is not none -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.git.'+role in states %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.git.'+role in states %}
|
||||
- roles.git.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
13
pillars/roles/gitea/init.sls
Normal file
13
pillars/roles/gitea/init.sls
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.git.none
|
||||
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.git.'+role in states %}
|
||||
- roles.git.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
0
pillars/roles/gitea/none.sls
Normal file
0
pillars/roles/gitea/none.sls
Normal file
25
pillars/roles/gitea/portal.sls
Normal file
25
pillars/roles/gitea/portal.sls
Normal file
|
@ -0,0 +1,25 @@
|
|||
git:
|
||||
tmux-root:
|
||||
repo: "ssh://gitea@git.actcur.com:5022/actcur/tmux.git"
|
||||
path: "/root/tmux"
|
||||
branch: "master"
|
||||
key: "git_actcur"
|
||||
force: true
|
||||
email: "actcur@actcur.com"
|
||||
name: "Actaeus Curabitur"
|
||||
tmux-ejparker:
|
||||
repo: "ssh://gitea@git.actcur.com:5022/actcur/tmux.git"
|
||||
path: "/ejparker/tmux"
|
||||
branch: "master"
|
||||
key: "git_actcur"
|
||||
force: true
|
||||
email: "actcur@actcur.com"
|
||||
name: "Actaeus Curabitur"
|
||||
web:
|
||||
repo: "ssh://gitea@git.actcur.com:5022/actcur/portal.git"
|
||||
path: "/srv/http/portal"
|
||||
branch: "master"
|
||||
key: "git_actcur"
|
||||
force: true
|
||||
email: "actcur@actcur.com"
|
||||
name: "Actaeus Curabitur"
|
17
pillars/roles/gitea/saltmaster.sls
Normal file
17
pillars/roles/gitea/saltmaster.sls
Normal file
|
@ -0,0 +1,17 @@
|
|||
git:
|
||||
salt:
|
||||
repo: "ssh://gitea@git.actcur.com:5022/actcur/salt.git"
|
||||
path: "/srv/salt/prod"
|
||||
branch: "master"
|
||||
key: "git_actcur"
|
||||
force: true
|
||||
email: "actcur@actcur.com"
|
||||
name: "Actaeus Curabitur"
|
||||
salt_dev:
|
||||
repo: "ssh://gitea@git.actcur.com:5022/actcur/salt.git"
|
||||
path: "/srv/salt/dev"
|
||||
branch: "dev"
|
||||
key: "git_actcur"
|
||||
force: true
|
||||
email: "actcur@actcur.com"
|
||||
name: "Actaeus Curabitur"
|
9
pillars/roles/gitea/ytdownloader.sls
Normal file
9
pillars/roles/gitea/ytdownloader.sls
Normal file
|
@ -0,0 +1,9 @@
|
|||
git:
|
||||
ytdownloader:
|
||||
repo: "ssh://gitea@git.actcur.com:5022/actcur/ytdownloader.git"
|
||||
path: "/root/scripts/ytdownloader"
|
||||
branch: "master"
|
||||
key: "git_actcur"
|
||||
force: true
|
||||
email: "actcur@actcur.com"
|
||||
name: "Actaeus Curabitur"
|
|
@ -1,12 +1,13 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.host.none
|
||||
|
||||
{%- if roles is not none -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.host.'+role in states %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.host.'+role in states %}
|
||||
- roles.host.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.laradev.none
|
||||
|
||||
{%- if roles is not none -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.laradev.'+role in states %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.laradev.'+role in states %}
|
||||
- roles.laradev.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.lxc.container_profiles
|
||||
|
||||
{%- if roles is not none -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.lxc.'+role in states %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.lxc.'+role in states %}
|
||||
- roles.lxc.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.mount.none
|
||||
|
||||
{%- if roles is not none -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.mount.'+role in states %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.mount.'+role in states %}
|
||||
- roles.mount.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.nginx.none
|
||||
{%- if roles is not none -%}
|
||||
{%- if 'portal' in roles -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.nginx.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- if 'portal' in grains['roles'] -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.nginx.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
- roles.nginx.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{%- for role in roles %}
|
||||
{%- if 'pillars.roles.nginx.'+role in states %}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
{%- for role in grains['roles'] %}
|
||||
{%- if 'pillars.roles.nginx.'+role in states %}
|
||||
- roles.nginx.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.router.none
|
||||
{%- if roles is not none -%}
|
||||
{%- if 'router' in roles -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.router.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- if 'router' in grains['roles'] -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.router.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
- roles.router.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{%- from "roles.jinja" import roles with context %}
|
||||
{% set states = salt['cp.list_states'](saltenv) %}
|
||||
include:
|
||||
- roles.services.none
|
||||
{%- if roles is not none -%}
|
||||
{%- if 'icinga' in roles -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.services.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
{%- if grains['roles'] is defined -%}
|
||||
{%- if grains['roles'] is not none -%}
|
||||
{%- if 'icinga' in grains['roles'] -%}
|
||||
{%- for state in states %}
|
||||
{%- if state.startswith("pillars.roles.services.") -%}
|
||||
{%- set role = state.split('.')[3] %}
|
||||
- roles.services.{{ role }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
|
Loading…
Add table
Reference in a new issue