-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjustfile
73 lines (57 loc) · 1.77 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
export PATH := justfile_directory() + "/env/bin:" + env_var("PATH")
# Recipes
@default:
just --list
### Run/Builds
build_adonalsium:
ansible-playbook -u root -b run.yml --limit adonalsium --ask-pass
build_ishap:
ansible-playbook -u root -b run.yml --limit ishap --ask-pass
build_virtuosity:
ansible-playbook -u root -b run.yml --limit virtuosity --ask-pass --ask-become-pass
build +HOST:
ansible-playbook -b run.yml --limit {{ HOST }}
### Updates
update:
ansible-playbook update.yml
docker:
ansible-playbook docker.yml
test:
ansible-playbook -b test.yml
### Vault
decrypt:
ansible-vault decrypt vars/vault.yaml
encrypt:
ansible-vault encrypt vars/vault.yaml
### Lint
yamllint:
yamllint -s .
ansible-lint: yamllint
#!/usr/bin/env bash
ansible-lint .
ansible-playbook run.yml update.yml bootstrap.yml docker.yml --syntax-check
### Bootstrap/Setup
bootstrap_lxc:
ansible-playbook -b bootstrap.yml --limit lxc ambition
bootstrap +HOST:
ansible-playbook -b bootstrap.yml --limit {{ HOST }} --ask-pass --ask-become-pass
install:
@./prereqs.sh
@echo "Ansible Vault pre-hook script setup and vault password set"
### Git
# git submodule - repo URL + optional local folder name
add-submodule URL *NAME:
#!/usr/bin/env sh
if [ -z "{{NAME}}" ]; then
# Extract repo name from URL if no name provided
basename=$(basename "{{URL}}" .git)
git submodule add {{URL}} "roles/${basename}"
git submodule update --init --recursive
git add .gitmodules "roles/${basename}"
git commit -m "Adds ${basename} as a submodule"
else
git submodule add {{URL}} "roles/{{NAME}}"
git submodule update --init --recursive
git add .gitmodules "roles/{{NAME}}"
git commit -m "Adds {{NAME}} as a submodule"
fi