roles/burp-server: Deploy BURP server
The *burp-server* role installs and configures a BURP server. It is adapted from a previous iteration, and should support CentOS/RHEL/Fedora and Gentoo, as well as both BURP 1.x and 2.x (depending on which version gets installed by the system package manager). To manage the certificate authority, the *burp-server* role uses the `burp_ca` command. This has the advantage of not requiring any external certificate management, but effectively binds the CA to a specific machine.
This commit is contained in:
23
roles/burp-server/library/burp_version
Normal file
23
roles/burp-server/library/burp_version
Normal file
@@ -0,0 +1,23 @@
|
||||
# vim: set ft=python :
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec={},
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
burp = module.get_bin_path('burp', required=True)
|
||||
rc, out, err = module.run_command([burp, '-v'], check_rc=True)
|
||||
burp_version = out.strip().split('-')[1]
|
||||
|
||||
module.exit_json(
|
||||
ansible_facts={
|
||||
'burp_version': burp_version,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user