diff --git a/pillars/roles/laradev/bbs.sls b/pillars/roles/laradev/bbs.sls index d02d439..59af6dd 100644 --- a/pillars/roles/laradev/bbs.sls +++ b/pillars/roles/laradev/bbs.sls @@ -1,3 +1,3 @@ laradev: bbs: - repo: "https://git.actcur.com/bowens/web.git" + repo: "ssh://gogs@git.actcur.com:5022/bowens/web.git" diff --git a/pillars/roles/laradev/clark-family.sls b/pillars/roles/laradev/clark-family.sls index 802c0b9..c05a0c5 100644 --- a/pillars/roles/laradev/clark-family.sls +++ b/pillars/roles/laradev/clark-family.sls @@ -1,3 +1,3 @@ laradev: clark: - repo: "https://git.actcur.com/karenp/Clark-family.git" + repo: "ssh://gogs@git.actcur.com:5022/karenp/Clark-family.git" diff --git a/pillars/roles/laradev/init.sls b/pillars/roles/laradev/init.sls index 4ec56df..c8ab74b 100644 --- a/pillars/roles/laradev/init.sls +++ b/pillars/roles/laradev/init.sls @@ -4,13 +4,10 @@ include: {%- if grains['roles'] is defined -%} {%- if grains['roles'] is not none -%} - {%- if 'laradev' in grains['roles'] -%} - {%- for state in states %} - {%- if state.startswith("pillars.roles.laradev.") -%} - {%- set role = state.split('.')[3] %} + {%- for role in grains['roles'] %} + {%- if 'pillars.roles.laradev.'+role in states %} - roles.laradev.{{ role }} - {%- endif -%} - {%- endfor -%} - {%- endif -%} + {%- endif -%} + {%- endfor -%} {%- endif -%} {%- endif -%} diff --git a/pillars/roles/laradev/ra.sls b/pillars/roles/laradev/ra.sls index f109570..a913e83 100644 --- a/pillars/roles/laradev/ra.sls +++ b/pillars/roles/laradev/ra.sls @@ -1,3 +1,3 @@ laradev: ra: - repo: "https://git.actcur.com/redactedaudio/web.git" + repo: "ssh://gogs@git.actcur.com:5022/redactedaudio/web.git" diff --git a/pillars/roles/nginx/clark-family.sls b/pillars/roles/nginx/clark-family.sls index 150cf95..400ed44 100644 --- a/pillars/roles/nginx/clark-family.sls +++ b/pillars/roles/nginx/clark-family.sls @@ -2,8 +2,8 @@ nginx: clark: auth: none https: - port: 4433 - prot: https + port: 8080 + prot: http portal: Dev: diff --git a/states/roles/maintain/laradev/init.sls b/states/roles/maintain/laradev/init.sls index 446fe0a..b67975c 100644 --- a/states/roles/maintain/laradev/init.sls +++ b/states/roles/maintain/laradev/init.sls @@ -68,24 +68,8 @@ laradev-nginx-conf: {%- if pillar['laradev'] is defined -%} {%- for server in pillar['laradev'] %} -"laradev-certs/{{server}}.actcur.com/": - file.recurse: - - name: /etc/nginx/certs/{{server}}.actcur.com/ - - source: salt://secure/certs/{{server}}.actcur.com/ -{%- if os=="CentOS" or os=="RedHat" %} - - user: nginx - - user: nginx -{%- elif os=="Arch" or os=="Manjaro" %} - - user: http - - group: http -{%- endif %} - - dir_mode: 755 - - file_mode: 400 - - clean: true - -laradev-nginx-{{ server }}.conf: +/etc/nginx/conf.d/laradev-{{ server }}.conf: file.managed: - - name: /etc/nginx/conf.d/{{ server }}.conf - makedirs: true - source: salt://roles/maintain/laradev/nginx.conf - user: root @@ -136,3 +120,17 @@ laradev-nginx-{{ server }}.conf: "git_branches.timer": service.running: - enable: true + +/root/.ssh/config: + file.managed: + - source: salt://roles/maintain/laradev/ssh_config + - user: root + - group: root + - mode: 644 + +/root/.ssh/git_actcur: + file.managed: + - source: salt://secure/keys/git/git_actcur + - user: root + - group: root + - mode: 600 diff --git a/states/roles/maintain/laradev/nginx.conf b/states/roles/maintain/laradev/nginx.conf index 95cd2f7..8ed5fa4 100644 --- a/states/roles/maintain/laradev/nginx.conf +++ b/states/roles/maintain/laradev/nginx.conf @@ -1,12 +1,8 @@ server { - listen 443; - server_name {{server}}.actcur.com; + listen 8080; + server_name {{server}}; root /sites/{{server}}; - ssl on; - ssl_certificate /etc/nginx/certs/{{server}}.actcur.com/fullchain.pem; - ssl_certificate_key /etc/nginx/certs/{{server}}.actcur.com/privkey.pem; - index index.html index.htm index.php; charset utf-8; @@ -38,4 +34,4 @@ server { } error_log /var/log/nginx/ra_error.log notice; access_log /var/log/nginx/ra_access.log; -} \ No newline at end of file +} diff --git a/states/roles/maintain/laradev/ssh_config b/states/roles/maintain/laradev/ssh_config new file mode 100644 index 0000000..0a09561 --- /dev/null +++ b/states/roles/maintain/laradev/ssh_config @@ -0,0 +1,5 @@ +Host git.actcur.com + Hostname git.actcur.com + Port 5022 + User gogs + IdentityFile ~/.ssh/git_actcur