Skip to content

Commit cd6e026

Browse files
committed
fix collection install
* specify collections in requirements.yml * `make envsetup` will install/upgrade collections based on requirements.yml
1 parent f9cc721 commit cd6e026

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1+
CERTBOT_SCRIPT = files/certbot.sh
2+
CERTBOT_WORKDIR = files/certbot.d
13
# Run pre-commit checks on all files
24
check:
35
pre-commit run --all-files
46

57
# Set up Ansible environment
68
# Includes required Ansible collections and pre-commit hooks
79
envsetup:
8-
ansible-galaxy collection install ansible.posix community.postgresql containers.podman
10+
ansible-galaxy collection install --upgrade -r requirements.yml
911
pre-commit install
1012

11-
# Update Ansible environment
12-
# Auto-updates all pre-commit hooks
13-
envupdate:
14-
pre-commit autoupdate
15-
1613
## The following tasks run the certbot helper script
1714
## Naming: certbot-(issue|renew)
18-
CERTBOT_SCRIPT=files/certbot.sh
19-
CERTBOT_WORKDIR=files/certbot.d
2015

2116
certbot-issue:
2217
$(CERTBOT_SCRIPT) $(CERTBOT_WORKDIR) issue

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,16 @@ Some `make` commands:
3434

3535
### Ansible Collections
3636

37-
Some Ansible roles here depend on additional Ansible collections:
38-
39-
- `ansible.posix`
40-
- `community.postgresql`
41-
- `containers.podman`
37+
Some Ansible roles here depend on additional Ansible collections. See [`requirements.yml`](requirements.yml) for details.
4238

4339
### Pre-commit hooks
4440

45-
Pre-commit hooks are configured. See [here](.pre-commit-config.yaml) for details.
41+
Pre-commit hooks are configured. See [`.pre-commit-config.yaml`](.pre-commit-config.yaml) for details.
4642

4743
To update pre-commit hooks, run:
4844

4945
```bash
50-
make envupdate
46+
pre-commit autoupdate
5147
```
5248

5349
## Hardware

requirements.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
collections:
3+
- ansible.posix
4+
- community.postgresql
5+
- containers.podman

0 commit comments

Comments
 (0)