mrlesmithjr / ansible-netplan

Ansible role to manage Netplan
MIT License
132 stars 85 forks source link

Bugfix add mode 0600 to netplan config file #40

Closed lanefu closed 1 year ago

lanefu commented 1 year ago

Description

newer netplan on Debian Sid errored because of file permission being too open. Added defaults driven attribute to specify mode when rendering template. Remediates error message below:

{"changed": true, "cmd": ["netplan", "generate"], "delta": "0:00:01.119055", "end": "2023-08-27 01:58:23.988600", "msg": "non-zero return code", "rc": 1, "start": "2023-08-27 01:58:22.869545", "stderr": "\n** (generate:2668): WARNING **: 01:58:23.846: Permissions for /etc/netplan/armbian-default.yaml are too open. Netplan configuration should NOT be accessible by others.\n/etc/netplan/armbian-default.yaml:3:12: Error in network definition: unknown renderer ''\n  renderer: \n           ^", "stderr_lines": ["", "** (generate:2668): WARNING **: 01:58:23.846: Permissions for /etc/netplan/armbian-default.yaml are too open. Netplan configuration should NOT be accessible by others.", "/etc/netplan/armbian-default.yaml:3:12: Error in network definition: unknown renderer ''", "  renderer: ", "           ^"], "stdout": "", "stdout_lines": []}

Types of changes

Checklist: