1
0

Переезд на новый сервер

This commit is contained in:
2022-08-11 22:09:57 +03:00
parent 706d7b6490
commit 25dca48b9b
5 changed files with 42 additions and 29 deletions

View File

@ -12,7 +12,7 @@ STAGE := vagrant
ifeq ($(STAGE), prod)
ANSIBLE_HOST_KEY_CHECKING := True
INVENTORY := ansible/hosts_prod
USER_ARGS := --user="mayor" --become
USER_ARGS := --user="major" --become
else
ANSIBLE_HOST_KEY_CHECKING := False
INVENTORY := ansible/hosts_vagrant
@ -25,6 +25,12 @@ else
TAGS_ARGS :=
endif
edit-vars:
EDITOR=micro \
ansible-vault edit \
--vault-password-file="ansible-vault-password-file" \
ansible/vars/vars.yml
configure:
ANSIBLE_HOST_KEY_CHECKING=$(ANSIBLE_HOST_KEY_CHECKING) \
ansible-playbook \
@ -35,6 +41,9 @@ configure:
--vault-password-file="ansible-vault-password-file" \
$(PLAYBOOK)
configure-prod:
$(MAKE) configure STAGE="prod"
configure-apps:
$(MAKE) configure TAGS="webserver,apps,env"
@ -47,7 +56,7 @@ dry-run:
--extra-vars='ansible_python_interpreter=/usr/bin/python3' \
--vault-password-file="ansible-vault-password-file" \
--check \
--diff \
--diff -vvv \
$(PLAYBOOK)
list-tags: