Skip to content

Commit 115c103

Browse files
committed
Document ansible toolkit workflows and settings
1 parent 0e00e3b commit 115c103

1 file changed

Lines changed: 47 additions & 10 deletions

File tree

docs/PLUGINS.md

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,33 @@ The `ansible` plugin adds an **Ansible Toolkit** entry to the global actions men
3535
### Features
3636

3737
- **Inventory generation**: Builds inventory from currently loaded Proxmox nodes and guests in YAML (default) or INI format.
38+
- **Inventory style modes**:
39+
- `compact`: shared ansible vars are lifted to `all:vars` / `all.vars`.
40+
- `expanded`: host-level vars are kept per-host.
3841
- **Inventory export**: Preview and save generated inventory to a user-selected path.
39-
- **Ad-hoc connectivity tests**: Run `ansible -m ping` with optional limit, extra arguments, and timeout.
40-
- **Playbook execution**: Run `ansible-playbook` against generated inventory with optional `--limit`, `--check`, custom args, and timeout.
41-
- **Smart default limit**: The Run Ping/Run Playbook forms prefill `Limit` from your current node/guest selection.
42-
- **SSH setup assistant**: Shows practical `ssh-copy-id` and validation commands for all discovered targets.
43-
- **Safe defaults**: Commands run without shell interpolation and temporary inventory files are created with `0600` permissions.
42+
- **Ad-hoc connectivity tests**: Run `ansible -m ping` with configurable scope, limit, target picker, extra args, and timeout.
43+
- **Playbook execution**: Run `ansible-playbook` with configurable scope, limit, target picker, `--check`, extra args, and timeout.
44+
- **Limit UX**: Ping/Playbook/Bootstrap forms include:
45+
- `Scope` (`all`, `nodes`, `guests`)
46+
- `Limit` (manual/custom)
47+
- `Target` picker (inventory groups and host aliases) that fills `Limit`.
48+
- **Bootstrap Access workflow**:
49+
- **Direct mode**: bootstraps via SSH / `pct exec` / QEMU guest agent (transport chosen by host type).
50+
- **Ansible mode**: runs a generated bootstrap playbook.
51+
- Supports dry-run and streamed output.
52+
- **Bootstrap diagnostics**:
53+
- dry-run plan markers (`would_*`, `plan_*`)
54+
- apply markers (`applied_*`)
55+
- pre/post SSH reachability hints in report (`before/after` on port 22 for IP targets).
56+
- **SSH Setup Guide**: Shows practical key-based setup examples.
57+
- **Settings UI**: General settings and bootstrap-specific settings are editable from the toolkit.
58+
- **Safe defaults**: Commands run without shell interpolation; temporary files are created with `0600` permissions.
4459

4560
### Requirements
4661

4762
- `ansible` and `ansible-playbook` must be available in your `PATH`.
48-
- SSH access must be configured for targets (`ssh_user` and optional `vm_ssh_user` in pvetui config are used as default inventory users).
63+
- SSH access must be configured for targets for Ping/Playbook and for direct bootstrap node access.
64+
- Direct bootstrap uses pvetui SSH users (`ssh_user` / `vm_ssh_user`) and system SSH defaults.
4965

5066
### Configuration
5167

@@ -57,23 +73,44 @@ plugins:
5773
- "ansible"
5874
ansible:
5975
inventory_format: "yaml" # yaml|ini
76+
inventory_style: "compact" # compact|expanded
77+
inventory_vars: # optional vars merged into each host/all vars
78+
ansible_python_interpreter: /usr/bin/python3
6079
default_user: "ubuntu" # optional ansible_user override
6180
# default_password: "secret" # optional sensitive field
6281
ssh_private_key_file: "~/.ssh/id_ed25519"
6382
default_limit_mode: "selection" # selection|all|none
6483
ask_pass: false
6584
ask_become_pass: false
66-
extra_args: []
85+
extra_args: [] # appended to ansible and ansible-playbook
86+
bootstrap:
87+
enabled: true
88+
username: "ansible"
89+
shell: "/bin/bash"
90+
create_home: true
91+
exclude_windows_guests: true # skip Windows guests in direct mode
92+
ssh_public_key_file: "~/.ssh/id_ed25519.pub"
93+
install_authorized_key: true
94+
set_password: false # if true, password below is required
95+
# password: "secret" # optional sensitive field
96+
grant_sudo_nopasswd: true
97+
sudoers_file_mode: "0440"
98+
dry_run_default: true
99+
parallelism: 10
100+
timeout: "2m"
101+
fail_fast: false
67102
```
68103

69104
Notes:
70-
- `default_password` is treated as sensitive data and follows the same encryption/decryption handling as other secrets.
71-
- `default_limit_mode: selection` preserves the selected node/guest behavior for prefilled limits in forms.
105+
- `default_password` and `bootstrap.password` are treated as sensitive fields and follow the same encryption/decryption handling as other secrets.
106+
- `default_limit_mode: selection` keeps node/guest selection behavior for prefilled form limits.
107+
- Bootstrap settings are edited in **Bootstrap Settings** from the toolkit.
72108

73109
### Notes
74110

75111
- The plugin uses nodes/guests currently loaded in the UI to build inventory.
76-
- Cancelling a running command from the plugin now cancels the underlying Ansible process context.
112+
- Cancelling a running command from the plugin cancels the underlying process context.
113+
- Direct bootstrap prepares user/key/sudo access; it does not guarantee SSH daemon/network reachability on guest targets.
77114

78115
## Command Runner Plugin
79116

0 commit comments

Comments
 (0)