Adding deploy work, updating zshrc to include correct container name for shell_plus command.

This commit is contained in:
Samuel Clay 2021-03-08 11:33:58 -05:00
parent f07e841f90
commit baabc678b4
5 changed files with 27 additions and 3 deletions

View file

@ -86,6 +86,8 @@ deploy_task:
- ansible-playbook ansible/deploy_task.yml
deploy_www:
- ansible-playbook ansible/deploy_www.yml
deploy_work:
- ansible-playbook ansible/deploy_work.yml
# Provision
app:

19
ansible/deploy_work.yml Normal file
View file

@ -0,0 +1,19 @@
---
- hosts: work
gather_facts: false
vars_files:
- env_vars/base.yml
- env_vars/dev.yml
tasks:
- name: Pull newsblur_web github
git:
repo: https://github.com/samuelclay/NewsBlur.git
dest: /srv/newsblur/
version: dashboard3
register: pulled
- name: Reload celery
become: yes
command: "docker kill --signal=HUP task-work"
when: '"task-work" in inventory_hostname'

View file

@ -7,9 +7,10 @@
# ignore_errors: yes
- name: Copy zshrc
copy:
src: zshrc.txt
template:
src: zshrc.txt.j2
dest: /home/nb/.zshrc
tags: zsh
- name: Installing Zsh and git
apt: pkg=zsh,git state=latest

View file

@ -43,7 +43,8 @@ alias cd..='cd ..'
alias smtp='python -m smtpd -n -c DebuggingServer 127.0.0.1:1025'
alias tlnb='echo "----------------\n"; tail -f /srv/newsblur/logs/newsblur.log'
alias sp='sudo docker exec -it newsblur_web python manage.py shell_plus'
alias sp='sudo docker exec -it {% if 'task' in inventory_hostname %}{{ inventory_hostname|regex_replace('\d+', '') }}{% else %}newsblur_web{% endif %} python manage.py shell_plus'
alias dps='sudo docker ps'
alias cdnb='cd /srv/newsblur'
alias sshdo=/srv/newsblur/utils/ssh.sh

View file

@ -15,4 +15,5 @@
- {role: 'consul', tags: 'consul'}
- {role: 'consul-client', tags: 'consul'}
- {role: 'web', tags: 'web'}
- {role: 'node', tags: 'node'}
- {role: 'nginx', tags: 'nginx'}