Update ansible code
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
156561e633
commit
18e86f8687
5 changed files with 120 additions and 118 deletions
|
|
@ -14,23 +14,23 @@
|
|||
when:
|
||||
- ansible_os_family == "RedHat"
|
||||
|
||||
#- name: Register new bouncer
|
||||
# command: cscli bouncers add {{ inventory_hostname }} -o raw
|
||||
# register: _csbouncer
|
||||
# delegate_to: "{{ crowdsec_delegate_server_hostname }}"
|
||||
# changed_when: _csbouncer.stderr is not search("already exists")
|
||||
#
|
||||
#- name: Deploy bouncer config
|
||||
# lineinfile:
|
||||
# regex: "{{ item.regex }}"
|
||||
# line: "{{ item.line }}"
|
||||
# dest: /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml
|
||||
# with_items:
|
||||
# - regex: "^api_url"
|
||||
# line: "api_url: {{ crowdsec_lapi_url }}"
|
||||
# - regex: "^api_key"
|
||||
# line: "api_key: {{ _csbouncer.stdout }}"
|
||||
# when: _csbouncer.changed
|
||||
# notify: restart crowdsec-firewall-bouncer
|
||||
# loop_control:
|
||||
# label: "{{ item.regex }}"
|
||||
# - name: Register new bouncer
|
||||
# ansible.builtin.command: cscli bouncers add {{ inventory_hostname }} -o raw
|
||||
# register: _csbouncer
|
||||
# delegate_to: "{{ crowdsec_delegate_server_hostname }}"
|
||||
# changed_when: _csbouncer.stderr is not search("already exists")
|
||||
#
|
||||
# - name: Deploy bouncer config
|
||||
# ansible.builtin.lineinfile:
|
||||
# regex: "{{ item.regex }}"
|
||||
# line: "{{ item.line }}"
|
||||
# dest: /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml
|
||||
# with_items:
|
||||
# - regex: "^api_url"
|
||||
# line: "api_url: {{ crowdsec_lapi_url }}"
|
||||
# - regex: "^api_key"
|
||||
# line: "api_key: {{ _csbouncer.stdout }}"
|
||||
# when: _csbouncer.changed
|
||||
# notify: restart crowdsec-firewall-bouncer
|
||||
# loop_control:
|
||||
# label: "{{ item.regex }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue