Commit graph

4 commits

Author SHA1 Message Date
519c84e7f3
feat(playbook): add support for SSH password prompt
Introduced a `--ask-pass` argument to prompt for the SSH password, using the same password as the become password when provided. This allows secure SSH connections without pre-stored credentials, enhancing security and flexibility in multi-user environments.
2024-10-26 15:48:43 +02:00
02f630fa5f
refactor(playbook): safely handle password with JSON encoding
Switches to using JSON encoding for handling the become password as an extra variable in subprocess calls. This ensures safer and more reliable handling of special characters within passwords, reducing the risk of shell injection vulnerabilities.
2024-10-26 14:58:04 +02:00
fdd1117f8c
chore: update file permissions for playbook.py
Changed file mode from 644 to 755 to enable execution permissions. This update allows the script to be run directly from the command line, improving ease of use and workflow efficiency. No changes to the file's content have been made.
2024-10-26 14:50:14 +02:00
63be88788e
feat: add Ansible support and improve inventory
- Added a new Python script to dynamically handle Ansible playbook executions with password prompts.
- Enhanced `inventory.yml` by defining explicit `ansible_name` and `ansible_host` for each host to improve manageability.
- Introduced `.gitignore` to omit `venv/` and `.vscode/` directories from version control, ensuring a cleaner repository.
- Updated `apt.yml` playbook to unify update and upgrade tasks, using `ansible.builtin.apt`.
- Created `requirements.txt` to manage Python dependencies, including `ansible`, `ansible-lint`, and `pyyaml`.

These changes streamline the management of Ansible hosts and execution of playbooks, aligning with best practices for ongoing development.
2024-10-25 18:50:37 +02:00