mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Move to subfolder & adapt paths
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
- name: Copy ews configuration file
|
||||
template:
|
||||
src: ../templates/ews.cfg
|
||||
dest: /data/ews/conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Patching tpot.yml with custom ews configuration file
|
||||
lineinfile:
|
||||
path: /opt/tpot/etc/tpot.yml
|
||||
insertafter: '/opt/ewsposter/ews.ip'
|
||||
line: ' - /data/ews/conf/ews.cfg:/opt/ewsposter/ews.cfg'
|
||||
|
||||
- name: Lookup HPFEED environment variables
|
||||
set_fact:
|
||||
myENABLE: "{{ lookup('env', 'myENABLE') }}"
|
||||
myHOST: "{{ lookup('env', 'myHOST') }}"
|
||||
myPORT: "{{ lookup('env', 'myPORT') }}"
|
||||
myCHANNEL: "{{ lookup('env', 'myCHANNEL') }}"
|
||||
myIDENT: "{{ lookup('env', 'myIDENT') }}"
|
||||
mySECRET: "{{ lookup('env', 'mySECRET') }}"
|
||||
myCERT: "{{ lookup('env', 'myCERT') }}"
|
||||
myFORMAT: "{{ lookup('env', 'myFORMAT') }}"
|
||||
|
||||
- name: Apply HPFEED settings in tpot.yml
|
||||
lineinfile:
|
||||
path: /opt/tpot/etc/tpot.yml
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
with_items:
|
||||
- { regexp: 'EWS_HPFEEDS_ENABLE.*', line: ' - EWS_HPFEEDS_ENABLE={{ myENABLE | lower }}' }
|
||||
- { regexp: 'EWS_HPFEEDS_HOST.*', line: ' - EWS_HPFEEDS_HOST={{ myHOST }}' }
|
||||
- { regexp: 'EWS_HPFEEDS_PORT.*', line: ' - EWS_HPFEEDS_PORT={{ myPORT }}' }
|
||||
- { regexp: 'EWS_HPFEEDS_CHANNELS.*', line: ' - EWS_HPFEEDS_CHANNELS={{ myCHANNEL }}' }
|
||||
- { regexp: 'EWS_HPFEEDS_IDENT.*', line: ' - EWS_HPFEEDS_IDENT={{ myIDENT }}' }
|
||||
- { regexp: 'EWS_HPFEEDS_SECRET.*', line: ' - EWS_HPFEEDS_SECRET={{ mySECRET }}' }
|
||||
- { regexp: 'EWS_HPFEEDS_TLSCERT.*', line: ' - EWS_HPFEEDS_TLSCERT={{ myCERT }}' }
|
||||
- { regexp: 'EWS_HPFEEDS_TLSCERT.False', line: ' - EWS_HPFEEDS_TLSCERT={{ myCERT | lower }}' }
|
||||
- { regexp: 'EWS_HPFEEDS_FORMAT.*', line: ' - EWS_HPFEEDS_FORMAT={{ myFORMAT }}' }
|
Reference in New Issue
Block a user