feat: Adds setup project to the justfile

This commit is contained in:
2024-11-27 19:55:49 -05:00
parent 2692509fbe
commit ee134d3ce8
4 changed files with 38 additions and 6 deletions

View File

@@ -6,12 +6,13 @@ default:
[group('plays')]
run *ARGS:
@ansible-playbook ./main.yml \
--inventory ./inventory.ini \
{{ARGS}}
# Run the repo-template option in the `dir` with the passed in arguements.
[group('plays')]
create-repo-template dir *ARGS:
@just run-playbook \
@just run \
--tags repo-template \
--extra-vars output_dir={{dir}} \
{{ARGS}}
@@ -19,11 +20,17 @@ create-repo-template dir *ARGS:
# Run the build-project option in the `dir` with the passed in arguements.
[group('plays')]
build-project dir *ARGS:
@just run-playbook \
@just run \
--tags build-project \
--extra-vars project_dir={{dir}} \
{{ARGS}}
[group('test')]
test *ARGS:
@ansible-playbook ./test/test.yml {{ARGS}}
# Setup a new consult project from a template repo.
[group('plays')]
setup-project repo-url version project-dir *ARGS:
@ansible-playbook ./main.yml \
--inventory ./inventory.ini \
--tags setup-project \
--extra-vars "{'template': {'repo': {'url': '{{repo-url}}', 'version': '{{version}}' }}}" \
--extra-vars "project_dir={{project-dir}}" \
{{ARGS}}