ansible --version
ansible [core 2.11.1]
ansible --version
ansible [core 2.11.1]
黄政 <hzgood123@gmail.com> 于2021年7月10日周六 下午1:57写道:
I would recommend you to come up with a data structure like -
vars:
my_data:
I can’t understand what your mean
I tried your method, I have no such luck
it can’t work for netplan
Abhijeet Kasurde <akasurde@redhat.com> 于2021年7月10日周六 下午2:01写道:
I am assuming that netplan_ssid is dynamically coming from wlo.output
so you can do like this
"Netplan uses YAML description files to configure network ..."
https://www.linux.com/topic/distributions/how-use-netplan-network-configuration-tool-linux/
See the example of the data
https://github.com/vbotka/ansible-linux-postinstall/blob/master/vars/main.yml.sample#L304
the template
https://github.com/vbotka/ansible-linux-postinstall/blob/master/templates/netplan-conf.j2
and the task to configure Netplan
https://github.com/vbotka/ansible-linux-postinstall/blob/master/tasks/netplan.yml#L21
thank everyone and json
I have solve it by as following----
any_errors_fatal: true
tasks:
netplan_packages:
Vladimir Botka <vbotka@gmail.com> 于2021年7月10日周六 下午3:28写道: