Skip to content

Conversation

@jmgilman
Copy link
Collaborator

Summary

  • Rewrites deploy.yml to use VyOS native load command instead of broken vyos_config module
  • Adds .gitignore for rendered configs and backup artifacts
  • Adds eth2 interface definition to gateway.conf

Problem

The vyos.vyos.vyos_config Ansible module claims to support bracket format configuration files but has critical bugs:

  1. Doesn't parse /* */ comments - Treats them as commands, resulting in errors like:

    set * Target: VP6630 (Minisforum)
    Configuration path: [*] is not valid
    
  2. Incorrectly converts bracket format to set commands - For example, firewall { interface eth0 {...}} becomes invalid set firewall interface eth0...

Solution

Use VyOS's native load command which properly handles bracket format with comments - the same approach used for manual USB provisioning:

  1. SCP rendered config to router (/tmp/gateway.conf)
  2. Run configureloadcommitsaveexit
  3. Clean up temp files

This mirrors the working manual process:

sudo mount /dev/sda1 /mnt/usb
configure
load /mnt/usb/gateway.conf
commit

Test plan

  • Verified playbook applies configuration changes correctly
  • Tested with interface description change (apply → verify → revert → verify)
  • Confirmed cleanup of temporary files on both local and remote

🤖 Generated with Claude Code

The vyos.vyos.vyos_config Ansible module claims to support bracket
format configuration files but has two critical bugs:
1. Doesn't parse /* */ comments (treats them as commands)
2. Incorrectly converts bracket format to set commands

This change switches to using VyOS's native `load` command which
properly handles bracket format with comments - the same approach
used for manual USB provisioning.

Changes:
- Rewrite deploy.yml to SCP config to router and use `load` command
- Add .gitignore for rendered configs and backup artifacts
- Add eth2 interface definition to gateway.conf

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jmgilman jmgilman force-pushed the fix/vyos-ansible-load-command branch from 1a2a354 to 8121d37 Compare December 30, 2025 05:01
@jmgilman jmgilman merged commit 2385698 into master Dec 30, 2025
1 check passed
@jmgilman jmgilman deleted the fix/vyos-ansible-load-command branch December 30, 2025 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants