<commit_before>PHONY: all vagrant clean-roles ansible-galaxy vagrant-up aws aws-provision site import-gpg-keys recrypt

all: 
	@echo "Please provide a target: vagrant|aws"

vagrant: clean-roles ansible-galaxy vagrant-up

clean-roles:
	rm -rf -- roles/*

ansible-galaxy:
	ansible-galaxy install -r requirements.yml --force

vagrant-up:
	vagrant up --provision

aws: aws-provision ansible-galaxy site

aws-provision: 
	ansible-playbook -i localhost, aws-provision.yml -v

site: 
	ansible-playbook -i ec2.py site.yml -v

import-gpg-keys:
	$(foreach var,$(shell cat gpg.recipients | awk -F: '{print $$1}'), gpg --list-public-key $(var) || gpg --keyserver hkp://keyserver.ubuntu.com --search-keys $(var);)

recrypt: import-gpg-keys
	ansible-vault decrypt group_vars/all/vault && pwgen -cynC1 15 | gpg --batch --yes --trust-model always -e -o vault_passphrase.gpg $(shell cat gpg.recipients | awk -F: {'printf "-r "$$1" "'}) && ansible-vault encrypt group_vars/all/vault
<commit_msg>Refactor Makefile to make it more readable<commit_after>.PHONY: all \
	vagrant clean-roles ansible-galaxy \
	vagrant-up aws aws-provision site \
	import-gpg-keys recrypt

all: 
	@echo "Please provide a target: vagrant|aws"

vagrant: clean-roles ansible-galaxy vagrant-up

clean-roles:
	rm -rf -- roles/*

ansible-galaxy:
	ansible-galaxy install -r requirements.yml --force

vagrant-up:
	vagrant up --provision

aws: aws-provision ansible-galaxy site

aws-provision: 
	ansible-playbook -i localhost, aws-provision.yml -v

site: 
	ansible-playbook -i ec2.py site.yml -v

import-gpg-keys:
	$(foreach var, \
		$(shell cat gpg.recipients | awk -F: '{print $$1}'), \
		gpg --list-public-key $(var) || gpg --keyserver hkp://keyserver.ubuntu.com --search-keys $(var);)

recrypt: import-gpg-keys
	ansible-vault decrypt group_vars/all/vault && pwgen -cynC1 15 | \
		gpg --batch --yes --trust-model always -e -o vault_passphrase.gpg \
			$(shell cat gpg.recipients | awk -F: {'printf "-r "$$1" "'}) && \
		ansible-vault encrypt group_vars/all/vault

{'fraction_non_alphanumeric': 0.14540942928039702, 'fraction_numerical': 0.005955334987593052, 'mean_word_length': 3.592255125284738, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '688527', 'n_tokens_mistral': 804, 'n_tokens_neox': 772, 'n_words': 199}