Skip to content

Commit

Permalink
irr_prefix host selection feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Renato Almeida de Oliveira committed Apr 17, 2020
1 parent e3f7542 commit b2dc371
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/modules/irr_prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def bgpq3Query(module, path):
args = args + "3"
if module.params["aggregate"]:
args = args + "A"
if module.params["host"]:
args = "%s -h %s" % (args, module.params["host"])
cmd = "%s -j%s -l irr_prefix %s" % (path, args, module.params["asSet"])
rc, stdout, stderr = module.run_command(cmd)
if stderr != "":
Expand Down Expand Up @@ -94,7 +96,8 @@ def main():
"asn32Safe": {"default": False, "type": "bool"},
"IPv": {"required": True, "type": "str", "choices": ['4', '6']},
"aggregate": {"default": False, "type": "bool"},
"asSet": {"required": True, "type": "str"}
"asSet": {"required": True, "type": "str"},
"host": {"required": False, "type": "str"}

}
module = AnsibleModule(argument_spec=fields)
Expand Down

0 comments on commit b2dc371

Please sign in to comment.