Compare commits
3 Commits
main
..
4897cdadbd
| Author | SHA1 | Date | |
|---|---|---|---|
| 4897cdadbd | |||
| e0571783ba | |||
| c633ead7cc |
@@ -1,97 +0,0 @@
|
|||||||
name: "Bug Report"
|
|
||||||
description: "Report a bug or unexpected behavior to help us improve"
|
|
||||||
title: "[BUG]: "
|
|
||||||
labels: ["bug"]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
## ⚠️ Before You Begin
|
|
||||||
Please ensure you have:
|
|
||||||
- [ ] Searched existing issues to avoid duplicates
|
|
||||||
- [ ] Confirmed this is a bug, not a question or configuration problem
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: description
|
|
||||||
attributes:
|
|
||||||
label: "📋 Description"
|
|
||||||
description: "Provide a clear and concise description of the bug"
|
|
||||||
placeholder: "What happened? What did you expect to happen instead?"
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: reproduction
|
|
||||||
attributes:
|
|
||||||
label: "🔁 Steps to Reproduce"
|
|
||||||
description: "Step-by-step instructions to reproduce the issue"
|
|
||||||
placeholder: |
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: expected
|
|
||||||
attributes:
|
|
||||||
label: "✅ Expected Behavior"
|
|
||||||
description: "What you expected to happen"
|
|
||||||
placeholder: "A clear description of what should happen..."
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: actual
|
|
||||||
attributes:
|
|
||||||
label: "❌ Actual Behavior"
|
|
||||||
description: "What actually happened"
|
|
||||||
placeholder: "Include error messages, stack traces, or unexpected outcomes..."
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: logs
|
|
||||||
attributes:
|
|
||||||
label: "📄 Logs / Screenshots"
|
|
||||||
description: |
|
|
||||||
Provide relevant logs, error messages, or screenshots.
|
|
||||||
For logs, please use a pastebin and share the URL.
|
|
||||||
**Remember to remove any sensitive information (API keys, passwords, etc.).**
|
|
||||||
placeholder: "Paste logs here or provide a Gist URL..."
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
---
|
|
||||||
## 🖥️ Environment Details
|
|
||||||
Please fill out the relevant information below.
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: additional
|
|
||||||
attributes:
|
|
||||||
label: "📎 Additional Context"
|
|
||||||
description: "Any other information that might be relevant"
|
|
||||||
placeholder: |
|
|
||||||
- Database type and version (e.g., PostgreSQL 15, SQLite)
|
|
||||||
- Reverse proxy/CDN in use (e.g., Nginx, Cloudflare)
|
|
||||||
- Any custom configuration
|
|
||||||
- Related issues or PRs
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: checkboxes
|
|
||||||
id: checklist
|
|
||||||
attributes:
|
|
||||||
label: "✅ Submission Checklist"
|
|
||||||
description: "Please confirm the following before submitting"
|
|
||||||
options:
|
|
||||||
- label: "I have searched for existing issues (open and closed) that report the same problem"
|
|
||||||
required: true
|
|
||||||
- label: "I have provided clear steps to reproduce the issue"
|
|
||||||
required: true
|
|
||||||
- label: "I have included relevant logs or error messages (with sensitive info removed)"
|
|
||||||
required: false
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
name: "Feature Request"
|
|
||||||
description: "Suggest a new feature or enhancement for this project"
|
|
||||||
title: "[FEATURE]: "
|
|
||||||
labels: ["enhancement"]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
## ⚠️ Before You Begin
|
|
||||||
Please ensure you have:
|
|
||||||
- [ ] Searched existing issues (open and closed) to avoid duplicates
|
|
||||||
- [ ] Reviewed the [project documentation](https://git.vmn.su/max/vmn-ansible/wiki) for existing functionality
|
|
||||||
- [ ] Confirmed this is a feature request, not a bug or configuration question
|
|
||||||
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: problem
|
|
||||||
attributes:
|
|
||||||
label: "🎯 Problem Statement"
|
|
||||||
description: "What problem does this feature solve? What can't you do today?"
|
|
||||||
placeholder: |
|
|
||||||
I'm always frustrated when...
|
|
||||||
Currently, it's hard/impossible to...
|
|
||||||
This feature would help me because...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: solution
|
|
||||||
attributes:
|
|
||||||
label: "💡 Proposed Solution"
|
|
||||||
description: "Describe the solution you'd like to see"
|
|
||||||
placeholder: |
|
|
||||||
A clear description of what you want to happen.
|
|
||||||
If you have a specific API, UI, or implementation in mind, describe it here.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: alternatives
|
|
||||||
attributes:
|
|
||||||
label: "🔄 Alternatives Considered"
|
|
||||||
description: "What alternative solutions or workarounds have you considered?"
|
|
||||||
placeholder: |
|
|
||||||
- Alternative A: ...
|
|
||||||
- Workaround B: ...
|
|
||||||
- Why these don't fully solve the problem
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: screenshots
|
|
||||||
attributes:
|
|
||||||
label: "📸 Screenshots"
|
|
||||||
description: "If you can, provide screenshots or diagrams of the proposed feature"
|
|
||||||
placeholder: "Drag and drop images or paste links..."
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
---
|
|
||||||
## 🔧 Implementation Details (Optional)
|
|
||||||
The following sections are for contributors who want to implement this feature.
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: technical
|
|
||||||
attributes:
|
|
||||||
label: "⚙️ Technical Approach"
|
|
||||||
description: "If you have ideas about how to implement this, share them here"
|
|
||||||
placeholder: |
|
|
||||||
- Which components/modules would be affected?
|
|
||||||
- Any database schema changes?
|
|
||||||
- API design considerations?
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: acceptance
|
|
||||||
attributes:
|
|
||||||
label: "✅ Acceptance Criteria"
|
|
||||||
description: "What does 'done' look like for this feature?"
|
|
||||||
placeholder: |
|
|
||||||
- [ ] Feature works in the UI
|
|
||||||
- [ ] API endpoints are documented
|
|
||||||
- [ ] Tests are added
|
|
||||||
- [ ] Documentation is updated
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
id: contribution
|
|
||||||
attributes:
|
|
||||||
label: "🤝 Are you willing to contribute this feature?"
|
|
||||||
description: "Knowing if you can help implement this helps us prioritize"
|
|
||||||
options:
|
|
||||||
- "Yes, I can contribute"
|
|
||||||
- "Yes, but I need guidance"
|
|
||||||
- "No, but I can test/review"
|
|
||||||
- "No, I'm just requesting"
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: checkboxes
|
|
||||||
id: checklist
|
|
||||||
attributes:
|
|
||||||
label: "✅ Submission Checklist"
|
|
||||||
description: "Please confirm the following before submitting"
|
|
||||||
options:
|
|
||||||
- label: "I have searched for existing issues (open and closed) that request the same feature"
|
|
||||||
required: true
|
|
||||||
- label: "I have explained the problem this feature solves"
|
|
||||||
required: true
|
|
||||||
- label: "I have described a concrete solution or direction"
|
|
||||||
required: true
|
|
||||||
- label: "I have considered alternatives and explained why they fall short"
|
|
||||||
required: false
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
name: "Refactor Request"
|
|
||||||
description: "Propose a code restructuring or cleanup with no behavior change"
|
|
||||||
title: "[REFACTOR]: "
|
|
||||||
labels: ["refactoring"]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
## ⚠️ Before You Begin
|
|
||||||
Please ensure you have:
|
|
||||||
- [ ] Searched existing issues (open and closed) to avoid duplicates
|
|
||||||
- [ ] Reviewed the [project documentation](https://git.vmn.su/max/vmn-ansible/wiki) for architecture guidelines
|
|
||||||
- [ ] Confirmed this is a refactor (code restructuring with NO behavior change), not a bug fix or new feature
|
|
||||||
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: problem
|
|
||||||
attributes:
|
|
||||||
label: "🎯 Problem Statement"
|
|
||||||
description: "What pain points does the current code cause? Why is this refactor needed?"
|
|
||||||
placeholder: |
|
|
||||||
The current implementation is difficult to maintain because...
|
|
||||||
This code has accumulated technical debt due to...
|
|
||||||
I'm constantly frustrated when working with this module because...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: scope
|
|
||||||
attributes:
|
|
||||||
label: "📂 Scope"
|
|
||||||
description: "Which files, modules, or components need refactoring? Be specific."
|
|
||||||
placeholder: |
|
|
||||||
- File paths: `src/auth/`, `internal/handler/`
|
|
||||||
- Component: `UserService` class
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: current-state
|
|
||||||
attributes:
|
|
||||||
label: "🔍 Current State"
|
|
||||||
description: "Describe the current code structure, its issues, and why it's problematic"
|
|
||||||
placeholder: |
|
|
||||||
- The function `processUser()` is 500+ lines long
|
|
||||||
- Duplicated logic across 3 different files
|
|
||||||
- Mixed concerns (business logic + HTTP handling)
|
|
||||||
- Poor test coverage makes changes risky
|
|
||||||
- Naming is unclear and inconsistent
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: proposed-changes
|
|
||||||
attributes:
|
|
||||||
label: "💡 Proposed Solution"
|
|
||||||
description: "What should the code look like after the refactor?"
|
|
||||||
placeholder: |
|
|
||||||
- Extract `processUser()` into smaller, focused functions
|
|
||||||
- Consolidate duplicated logic into a shared utility
|
|
||||||
- Separate business logic from HTTP handlers
|
|
||||||
- Introduce interfaces for better testability
|
|
||||||
- Rename variables and functions for clarity
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: constraints
|
|
||||||
attributes:
|
|
||||||
label: "🚫 Constraints"
|
|
||||||
description: "What must NOT change? Public APIs, behavior, backward compatibility, performance characteristics?"
|
|
||||||
placeholder: |
|
|
||||||
- All public APIs must remain identical
|
|
||||||
- Database schema must not change
|
|
||||||
- External behavior must be identical
|
|
||||||
- Response formats must stay the same
|
|
||||||
- Performance must not degrade
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: benefits
|
|
||||||
attributes:
|
|
||||||
label: "📈 Expected Benefits"
|
|
||||||
description: "What improvements will this refactor bring?"
|
|
||||||
placeholder: |
|
|
||||||
- Improved maintainability
|
|
||||||
- Better testability
|
|
||||||
- Reduced code duplication
|
|
||||||
- Clearer separation of concerns
|
|
||||||
- Easier onboarding for new contributors
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: risks
|
|
||||||
attributes:
|
|
||||||
label: "⚠️ Risks & Mitigations"
|
|
||||||
description: "What could go wrong, and how will you mitigate it?"
|
|
||||||
placeholder: |
|
|
||||||
- Risk: Regression bugs
|
|
||||||
Mitigation: Comprehensive test coverage before and after
|
|
||||||
- Risk: Large diff making code review difficult
|
|
||||||
Mitigation: Break into smaller, incremental PRs
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: alternatives
|
|
||||||
attributes:
|
|
||||||
label: "🔄 Alternatives Considered"
|
|
||||||
description: "What other approaches did you consider, and why did you reject them?"
|
|
||||||
placeholder: |
|
|
||||||
- Alternative A: Complete rewrite — rejected because too risky
|
|
||||||
- Alternative B: Gradual deprecation — rejected because too slow
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
id: contribution
|
|
||||||
attributes:
|
|
||||||
label: "🤝 Are you willing to contribute this refactor?"
|
|
||||||
description: "Knowing if you can help implement this helps us prioritize"
|
|
||||||
options:
|
|
||||||
- "Yes, I can contribute"
|
|
||||||
- "Yes, but I need guidance"
|
|
||||||
- "No, but I can review"
|
|
||||||
- "No, I'm just suggesting"
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: checkboxes
|
|
||||||
id: checklist
|
|
||||||
attributes:
|
|
||||||
label: "✅ Submission Checklist"
|
|
||||||
description: "Please confirm the following before submitting"
|
|
||||||
options:
|
|
||||||
- label: "I have searched for existing issues (open and closed) that request the same refactor"
|
|
||||||
required: true
|
|
||||||
- label: "I have clearly explained the problem this refactor solves"
|
|
||||||
required: true
|
|
||||||
- label: "I have described the scope of the refactor (specific files/modules)"
|
|
||||||
required: false
|
|
||||||
- label: "I have identified what must NOT change (APIs, behavior, backward compatibility)"
|
|
||||||
required: false
|
|
||||||
@@ -1,3 +1,20 @@
|
|||||||
# ansible_home
|
# ansible_home
|
||||||
|
|
||||||
My own home services automation repository
|
## How to use it?
|
||||||
|
|
||||||
|
It's better to use a virtual environment to avoid incompatibility issues
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.vmn.su/max/vmn-ansible
|
||||||
|
cd vmn-ansible
|
||||||
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
ansible-galaxy collection install -r requirements.yaml
|
||||||
|
ansible-galaxy role install -r requirements.yaml
|
||||||
|
ansible-playbook playbooks/deploy_and_set_up_lxc_on_proxmox.yaml --vault-pass-file $VAULT_PASS_PATH -i inventory/localhost.yaml --private-key $SSH_KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
**deploy** playbooks must be used with `inventory/localhost.yaml`, they need access to proxmox host only
|
||||||
|
|
||||||
|
There are also a systemd service and timer under `systemd` directory
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# PUT NEW BLOCKS STRICTLY BEFORE ANY MATCH BLOCK
|
||||||
|
|
||||||
|
|
||||||
|
# Private keys are NOT distributed via Ansible
|
||||||
|
# They must to be copied manually ONLY to those hosts that need access to others
|
||||||
|
|
||||||
|
# Most of the home major LAN hosts should be accessible with this key
|
||||||
|
Match 192.168.0.0/24
|
||||||
|
User max
|
||||||
|
IdentityFile ~/.ssh/max_regular_key
|
||||||
|
|
||||||
|
# This virtual network has the same hosts range
|
||||||
|
Match 10.9.2.0/24
|
||||||
|
User max
|
||||||
|
IdentityFile ~/.ssh/max_regular_key
|
||||||
@@ -48,6 +48,15 @@
|
|||||||
group: "{{ human_admin_user }}"
|
group: "{{ human_admin_user }}"
|
||||||
mode: u=rw,g=r,o-rwx
|
mode: u=rw,g=r,o-rwx
|
||||||
|
|
||||||
|
- name: Configure ssh client, by pushing the config
|
||||||
|
remote_user: ansible
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ role_path }}/files/ssh_config"
|
||||||
|
dest: "/home/{{ human_admin_user }}/.ssh/config"
|
||||||
|
owner: "{{ human_admin_user }}"
|
||||||
|
group: "{{ human_admin_user }}"
|
||||||
|
mode: u=rw,g=r,o-rwx
|
||||||
|
|
||||||
|
|
||||||
# WARNING: we've finished with the initial setup, drop ansible key
|
# WARNING: we've finished with the initial setup, drop ansible key
|
||||||
# Push regular user key
|
# Push regular user key
|
||||||
|
|||||||
Reference in New Issue
Block a user