refactor(deps): revert Python version to 3.10 and add run command
- Revert `.python-version` from 3.13 back to 3.10 for compatibility - Add `run` command to task script for executing Ansible ad-hoc commands - Update CHANGELOG to reflect Python version change and new command - Add documentation in ssh role for showing OpenSSH version via `task run`
This commit is contained in:
4 files changed
+21
-3
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
3.13
|
||||
3.10
|
||||
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Added
|
||||
|
||||
- Do a port knocking in `certbot_check.yml` task.
|
||||
- Command `run` to execute Ansible commands.
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -27,3 +28,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Updated more bash scripts including ansible-vault-get, get-public-ip, docker-mysql-list, and docker-mysql-drop.
|
||||
- Changed shebang from #!/bin/bash to #!/usr/bin/env bash for portability.
|
||||
- Merged `odoo_scripts` into `odoo` role.
|
||||
- Set Python version to `3.10`.
|
||||
- Remove version check in `requirements.txt`.
|
||||
@@ -22,3 +22,13 @@ And include it in your playbook.
|
||||
roles:
|
||||
- role: ssh
|
||||
```
|
||||
|
||||
## Docs
|
||||
|
||||
### Show OpenSSH version
|
||||
|
||||
Show OpenSSH version for alls hosts.
|
||||
|
||||
```bash
|
||||
task run all -i inventories/setup -a "ssh -V"
|
||||
```
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
help-table() {
|
||||
local cmd_width=24
|
||||
local opt_width=24
|
||||
local cmd_width=30
|
||||
local opt_width=26
|
||||
local desc_width=70
|
||||
local column="| %-${cmd_width}s | %-${opt_width}s | %-${desc_width}s |\n"
|
||||
|
||||
@@ -51,6 +51,7 @@ help-table() {
|
||||
printf "$column" 'pull-repos' '' 'Pull git repos in inventories folder.'
|
||||
# Run
|
||||
printf "$column" 'play' '' 'Run ansible-playbook command.'
|
||||
printf "$column" 'run' '' 'Run ansible command.'
|
||||
printf "$column" 'connect-host' '[host]' 'Connect to host with configs.'
|
||||
# Test
|
||||
printf "$column" 'test-localhost' '[cleanup]' 'Deploy to localhost. Pass option '\''cleanup'\'' to reset test env.'
|
||||
@@ -330,6 +331,10 @@ play() {
|
||||
ansible-playbook "$@"
|
||||
}
|
||||
|
||||
run() {
|
||||
ansible "$@"
|
||||
}
|
||||
|
||||
upgrade() {
|
||||
echo "Update Ansible"
|
||||
uv pip install --upgrade ansible
|
||||
|
||||
Reference in new issue
Block a user