diff --git a/.taskfiles/ansible.yml b/.taskfiles/ansible.yml index 9a6f2867..e190318a 100644 --- a/.taskfiles/ansible.yml +++ b/.taskfiles/ansible.yml @@ -10,7 +10,7 @@ vars: tasks: - deps: + init: desc: Upgrade Ansible galaxy deps dir: provision/ansible cmds: diff --git a/.taskfiles/pre-commit.yml b/.taskfiles/pre-commit.yml index 22d53b15..476507f9 100644 --- a/.taskfiles/pre-commit.yml +++ b/.taskfiles/pre-commit.yml @@ -2,6 +2,7 @@ version: "3" tasks: + init: desc: Initialize pre-commit hooks cmds: @@ -10,3 +11,8 @@ tasks: desc: Run pre-commit cmds: - pre-commit run --all-files + + update: + desc: Update pre-commt hooks + cmds: + - pre-commit autoupdate diff --git a/.taskfiles/terraform.yml b/.taskfiles/terraform.yml index 3b7089a3..7c36bec4 100644 --- a/.taskfiles/terraform.yml +++ b/.taskfiles/terraform.yml @@ -3,7 +3,7 @@ version: "3" tasks: - deps: + init: desc: Initialize terraform dependencies dir: provision/terraform/cloudflare cmds: diff --git a/README.md b/README.md index 77119651..e332d1b4 100644 --- a/README.md +++ b/README.md @@ -95,20 +95,10 @@ After pre-commit is installed on your machine run: task pre-commit:init ``` -**Remember to run this on each new clone of the repository for it to have effect.** - -Commands are of interest, for learning purposes: - -This command makes it so pre-commit runs on `git commit`, and also installs environments per the config file. - -```sh -pre-commit install --install-hooks -``` - This command checks for new versions of hooks, though it will occasionally make mistakes, so verify its results. ```sh -pre-commit autoupdate +task pre-commit:update ``` ## 📂 Repository structure @@ -224,7 +214,7 @@ In order to use Terraform and `cert-manager` with the Cloudflare DNS challenge y 2. Install the Ansible deps ```sh - task ansible:deps + task ansible:init ``` 3. Verify Ansible can view your config @@ -293,7 +283,7 @@ If your domain already has existing DNS records **be sure to export those DNS se 1. Pull in the Terraform deps ```sh - task terraform:deps + task terraform:init ``` 2. Review the changes Terraform will make to your Cloudflare domain