4
4
5
5
This scripts looks at the following files:
6
6
- global-config/dns-entries.yml for custom DNS entries
7
- - group_vars/all .yml for general AS settings; specifically the following options:
7
+ - global-config/general .yml for general AS settings; specifically the following options:
8
8
"ownnets4", "ownnets6", "dns_*"
9
9
- The inventory file (hosts.yml) to create host records for routers, unless --no-host-records is set
10
10
-
@@ -155,15 +155,15 @@ def write_ptr6_zone(netblock):
155
155
def _load_config ():
156
156
global hosts
157
157
hosts = yaml_load (args .hosts )['dn42routers' ]['hosts' ]
158
- group_vars = yaml_load (args .group_vars )
158
+ general_vars = yaml_load (args .general_conf )
159
159
160
160
# Follow Ansible templating for dns-entries.yml
161
161
with open (args .dns_entries ) as f :
162
162
dns_entries_raw = f .read ()
163
163
dns_entries_tmpl = jinja2 .Template (dns_entries_raw )
164
- dns_entries = yaml .full_load (dns_entries_tmpl .render (group_vars ))
164
+ dns_entries = yaml .full_load (dns_entries_tmpl .render (general_vars ))
165
165
166
- global_vars .update (group_vars )
166
+ global_vars .update (general_vars )
167
167
global_vars .update (dns_entries )
168
168
169
169
def main ():
@@ -173,8 +173,8 @@ def main():
173
173
type = str , default = 'hosts.yml' )
174
174
parser .add_argument ("-D" , "--dns-entries" , help = "path to DNS entries configuration" ,
175
175
type = str , default = 'global-config/dns-entries.yml' )
176
- parser .add_argument ("-G" , "--group-vars " , help = "path to group vars configuration" ,
177
- type = str , default = 'group_vars/all .yml' )
176
+ parser .add_argument ("-G" , "--general-conf " , help = "path to general configuration" ,
177
+ type = str , default = 'global-config/general .yml' )
178
178
global args
179
179
args = parser .parse_args ()
180
180
0 commit comments