Commit Graph

14 Commits

Author SHA1 Message Date
Jakub Sokołowski 92c6c74bcf
ansible/roles.py: fix pull call to handle up-to-date repo
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-06-24 08:47:40 +02:00
Jakub Sokołowski bebd6df798
ansible/bootstrap: fix use of versioncheck.py
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-06-20 11:59:02 +02:00
Jakub Sokołowski b2e7060508
ansible/roles.py: fix colors when called via ansible
Asnible colors things, and we don't want them colored.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-06-13 17:10:33 +02:00
Jakub Sokołowski f31c778de0
ansible/roles.py: avoid unnecessary git calls
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-06-13 17:10:21 +02:00
Jakub Sokołowski 6515c4b281
ansible/roles.py: fix checking ancestry during update
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-06-13 17:09:53 +02:00
Jakub Sokołowski c17561ec12
ansible/roles.py: fix checking git ancestry
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-06-13 15:26:45 +02:00
Jakub Sokołowski 750e12d1ad
ansible/roles.py: fix formating of role names
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-06-13 15:18:35 +02:00
Jakub Sokołowski 49df6d5996
roles.py: script to replace Ansible Galaxy
Usage:
```
usage: roles.py [-h] [-f FILTER] [-w WORKERS] [-r REQUIREMENTS] [-s ROLES_SYMLINK] [-l LOG_LEVEL] [-d] [-a] [-i | -c | -u]

This tool managed Ansible roles as Git repositories.
It is both faster and simpler than Ansible Galaxy.

By default ~/.ansible/roles is symlinked to ~/work.
Override it using --roles-symlink or ROLES_SYMLINK.

Installation behavior:
- If no version is specified newest is pulled.
- If version is matching nothing is done.
- If repo is dirty or detached nothing is done.
- If version is newer user is notified.

options:
  -h, --help            show this help message and exit
  -f FILTER, --filter FILTER
                        Filter role repo names.
  -w WORKERS, --workers WORKERS
                        Max workers to run in parallel.
  -r REQUIREMENTS, --requirements REQUIREMENTS
                        Location of requirements.yml file.
  -s ROLES_SYMLINK, --roles-symlink ROLES_SYMLINK
                        Actual location of installed roles.
  -l LOG_LEVEL, --log-level LOG_LEVEL
                        Logging level.
  -d, --fail-dirty      Fail if repo is dirty.
  -a, --fail-detached   Fail if repo has detached head.
  -i, --install         Clone and update required roles.
  -c, --check           Only check roles, no installing.
  -u, --update          Update requirements with current commits.

Examples:
./roles.py --install
./roles.py --check
./roles.py --update
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-06-13 14:07:14 +02:00
Jakub Sokołowski 23d081362e
lookup_plugins/bitwarden: ignore stderr
Otherwise we get weird JSON parsing errors:
```
An unhandled exception occurred while running the lookup plugin 'bitwarden'.
Error was a <class 'json.decoder.JSONDecodeError'>, original message:
Extra data: line 1 column 843 (char 842). Extra data: line 1 column 843 (char 842)
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-05-07 14:36:33 +02:00
Jakub Sokołowski 54614d2988
requirements: use full repo names
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-03-09 10:40:09 +01:00
Anton Iakimov 8372392ef1
minor updates after infra-shards
1. add consul certs
2. don't fix ansible roles version
3. README to update infra-repos
2023-10-05 14:02:30 +02:00
Jakub Sokołowski be8917fe20
add ansibe/files/README.md to keep the dir
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-01-29 14:21:31 +01:00
Jakub Sokołowski 1dc2e6dd20
ansible/upgrade.yml: remove packages after reboot
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-17 19:04:15 +02:00
Jakub Sokołowski 18b55da6f9
add Ansible boilerplate
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-11 14:46:01 +02:00