Merge branch 'master' of github.com:jowj/agares

pull/1/head
jowj 6 years ago
commit 01642401e1

@ -12,3 +12,4 @@ automate syncing and configuration of machines in my inventory so that i don't h
* set windows privacy settings
* remove bloatware
* sync emacs config
* sync keyboard config for infinity ergodox

@ -0,0 +1,20 @@
- name: Deploy Arke
hosts: dockerhosts
remote_user: josiah
tasks:
- name: Get hostname for troubleshooting
command: hostname
register: hostname
- debug: msg="{{ hostname.stdout }}"
- name: Pull latest version from github
shell: cd /home/josiah/arke/ && git pull
- name: Build from the latest version
shell: cd ~/arke/ && docker build -t arke -f dockerfile .
- name: Check if there are any existing arke containers running and kill it
# this has to be a shell because command: isn't interactive
shell: docker ps | grep 'arke' | awk '{print $1}' | xargs docker kill
- name: Remove any existing containers using the arke name, its mine and i must have it
# this has to be a shell because command: isn't interactive
shell: docker container rm arke
- name: Run the newly built docker container
command: docker run -d --name arke --mount source=towervol,target=/shared/ arke:latest

@ -0,0 +1,16 @@
all:
children:
dockerhosts:
hosts:
monitoring.awful.club:
vars:
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q ansible@ssh.awful.club"'
macs:
hosts:
hydra-ling:
windows:
hosts:
lurker-ling:
linux:
hosts:
ling-bane:

@ -2,10 +2,15 @@ all:
children:
dockerhosts:
hosts:
192.168.1.156:
monitoring.awful.club:
vars:
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q ansible@ssh.awful.club"'
macs:
hosts:
hydra-ling:
windows:
hosts:
lurker-ling:
lurker-ling:
linux:
hosts:
ling-bane:

@ -4,12 +4,20 @@
- mojo-vars-vault.yml
remote_user: josiah
tasks:
- name: print hostname
command: hostname
register: hostname
- debug: msg="{{ hostname.stdout }}"
- name: print working directory
shell: ls -la | grep 'mojo'
register: ls
- debug: msg="{{ ls.stdout }}"
- name: Pull latest version from github
command: cd ~/mojojojo-bot && git pull
shell: cd /home/josiah/mojojojo-bot/ && git pull
- name: Build from the latest version
command: cd ~/mojojojo-bot && docker build -t mojo -f docker/dockerfile .
shell: cd ~/mojojojo-bot && docker build -t mojo -f docker/dockerfile .
- name: Check if there are any existing mojo containers running and kill it
# this has to be a shell because command: isn't interactive
shell: docker ps | grep 'mojo' | awk '{print $1}' | xargs docker kill
shell: docker ps | grep -E 'Up|Restarting' | awk '{print $1}' | xargs docker kill
- name: Run the newly built docker container
command: docker container run -e "SLACK_BOT_TOKEN={{ VAULT_SLACK_BOT_TOKEN }}" --restart "always" -d mojo
command: docker container run -e "SLACK_BOT_TOKEN={{ VAULT_SLACK_BOT_TOKEN }}" --restart "always" -d --mount source=towervol,target=/shared/ mojo

Loading…
Cancel
Save