Compare commits

..

No commits in common. "69ae923d1b6093db509bacafa45ca5a8e9d4a97a" and "c806506a0a8a50feb74265c6b599a13004e43f20" have entirely different histories.

2 changed files with 1 additions and 25 deletions

1
ansible/roles/test.md Normal file
View File

@ -0,0 +1 @@
infolegale

View File

@ -1,25 +0,0 @@
## Auto-generated documentation for Terraform module
### Installation de terraform-docs
```bash
cd /tmp/
wget https://github.com/terraform-docs/terraform-docs/releases/download/v0.16.0/terraform-docs-v0.16.0-linux-amd64.tar.gz
tar xf terraform-docs-v0.16.0-linux-amd64.tar.gz
sudo mv terraform-docs /usr/local/bin
```
## Hook pre-commit
```bash
cat << EOF > .git/hooks/pre-commit
#!/bin/sh
# Keep module docs up to date
target_dir=$(find . -type f -name "*.tf" -not -path "*/.terraform/*" -exec dirname {} \; | sort -u)
for d in ${target_dir}; do
if terraform-docs -c .terraform-docs.yml --output-file README.md $d ; then
git add "./$d/README.md"
fi
done
EOF