We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello
is there an option to add comments into netplan ?
i want my /etc/netplan/00-installer-config.yaml to look like:
#TO-WAN enp0s31f6: dhcp4: true # addresses: [10.42.0.1/24] # routes: # - to: default # via: 10.42.0.1 # nameservers: # addresses: [8.8.8.8,8.8.4.4] #ToRouter enp4s0: dhcp4: no addresses: [192.168.8.100/24] # routes: # - to: default # via: 192.168.8.1 # nameservers: # addresses: [8.8.8.8,8.8.4.4] #slot1 enp5s0: dhcp4: no ignore-carrier: true addresses: [10.42.1.1/24] #slot2 enp6s0: dhcp4: no ignore-carrier: true addresses: [10.42.2.1/24] how do i push the #slot2 for example?
The text was updated successfully, but these errors were encountered:
There is no such option. However, the task is flexible
- name: "Netplan: Configure files in {{ lp_netplan_root }}" notify: netplan apply ansible.builtin.template: src: netplan-conf.j2 dest: "{{ lp_netplan_root }}/{{ item.file }}" owner: "{{ item.owner | d(lp_netplan_owner) }}" group: "{{ item.group | d(lp_netplan_group) }}" mode: "{{ item.mode | d(lp_netplan_mode) }}" backup: "{{ lp_backup_conf }}" loop: "{{ lp_netplan_conf }}" loop_control: label: "{{ item.file }}"
You can create and use a template that will serve your use case. Fit the data too. For example,
lp_netplan_conf: - file: 00-installer-config.yaml category: ethernets conf: enp0s31f6: dhcp4: true label: "#TO-WAN" comment: | # addresses: [10.42.0.1/24] # routes: # - to: default # via: 10.42.0.1 # nameservers: # addresses: [8.8.8.8,8.8.4.4] ...
Sorry, something went wrong.
No branches or pull requests
Hello
is there an option to add comments into netplan ?
i want my /etc/netplan/00-installer-config.yaml to look like:
The text was updated successfully, but these errors were encountered: