aruba: add minimal (untested) role
parent
2e10714a79
commit
8d596082b3
@ -0,0 +1,16 @@
|
||||
class FilterModule:
|
||||
def filters(self):
|
||||
return {
|
||||
"enquote": enquote,
|
||||
}
|
||||
|
||||
|
||||
def enquote(string, delimiter='"', escape="\\"):
|
||||
translation = str.maketrans(
|
||||
{
|
||||
delimiter: f"{escape}{delimiter}",
|
||||
escape: f"{escape}{escape}",
|
||||
}
|
||||
)
|
||||
escaped = string.translate(translation)
|
||||
return f"{delimiter}{escaped}{delimiter}"
|
@ -0,0 +1,9 @@
|
||||
class FilterModule:
|
||||
def filters(self):
|
||||
return {
|
||||
"contains": contains,
|
||||
}
|
||||
|
||||
|
||||
def contains(a, b):
|
||||
return b in a
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
aruba__ntp_servers: []
|
||||
aruba__vlans: {}
|
||||
aruba__interfaces: {}
|
||||
aruba__default_gateways: []
|
||||
aruba__ssh_enabled: False
|
||||
aruba__loop_protect_disable_timer: 30
|
||||
aruba__loop_protect_tx_interval: 3
|
||||
...
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Generation configuration
|
||||
set_fact:
|
||||
aruba__config: "{{ lookup('template', './config.j2') }}"
|
||||
|
||||
- name: Write configuration
|
||||
delegate_to: localhost
|
||||
copy:
|
||||
content: "{{ aruba__config }}"
|
||||
dest: /tmp/aruba.config
|
||||
...
|
Loading…
Reference in New Issue