Using the generic *burp.pyrocufflink.blue* name will allow easier transition to a new BURP server. However, since this is not the actual name, it cannot be used for task delegation, so a separate variable is required to store the real name of the BURP server. This is only used during client deployment, and not by BURP itself.
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
- name: load distribution-specific variables
|
|
include_vars: '{{ item }}'
|
|
with_first_found:
|
|
- '{{ ansible_distribution }}.yml'
|
|
- '{{ ansible_os_family }}.yml'
|
|
- defaults.yml
|
|
tags:
|
|
- always
|
|
- name: load burp secrets
|
|
include_vars: '{{ item }}'
|
|
with_fileglob: vault/burp/{{ ansible_fqdn }}
|
|
tags:
|
|
- always
|
|
|
|
- name: ensure burp is installed
|
|
package:
|
|
name={{ burp_client_packages|join(',') }}
|
|
state=present
|
|
tags:
|
|
- install
|
|
|
|
- name: ensure burp server is configured for client
|
|
template:
|
|
src=server-clientconf.j2
|
|
dest=/etc/burp/clientconfdir/{{ ansible_fqdn }}
|
|
owner=burp
|
|
group=burp
|
|
mode=0400
|
|
delegate_to: '{{ burp_server_hostname }}'
|
|
|
|
- name: ensure burp pre-backup script is installed
|
|
copy:
|
|
src=scripts/{{ inventory_hostname }}/{{ burp_backup_script_pre|basename }}
|
|
dest={{ burp_backup_script_pre }}
|
|
mode=0755
|
|
when: burp_backup_script_pre is defined
|
|
- name: ensure burp post-backup script is installed
|
|
copy:
|
|
src=scripts/{{ inventory_hostname }}/{{ burp_backup_script_post|basename }}
|
|
dest={{ burp_backup_script_post }}
|
|
mode=0755
|
|
when: burp_backup_script_post is defined
|
|
- name: ensure burp client is configured
|
|
template:
|
|
src=burp.conf.j2
|
|
dest=/etc/burp/burp.conf
|
|
mode=0600
|
|
- name: ensure burp client certificate is available
|
|
command:
|
|
burp -c /etc/burp/burp.conf -g
|
|
creates=/etc/burp/ssl_cert-client.pem
|
|
- name: ensure automatic backup is scheduled
|
|
copy:
|
|
src={{ burp_backup_crontab }}
|
|
dest=/etc/cron.d/burp-backup
|
|
mode=0644
|