Fix somes lint errors
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
18e86f8687
commit
d4e8f60fe9
3 changed files with 5 additions and 4 deletions
|
|
@ -19,7 +19,7 @@
|
|||
# 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 }}"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
- name: add crowdsec repository
|
||||
ansible.builtin.apt_repository:
|
||||
repo: 'deb https://packagecloud.io/crowdsec/crowdsec/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release|lower }} main'
|
||||
repo: 'deb https://packagecloud.io/crowdsec/crowdsec/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release | lower }} main'
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
---
|
||||
- name: Check if agent is already registered
|
||||
ansible.builtin.shell: cscli machines list -o raw | grep {{ inventory_hostname }} | grep true || echo "Not found"
|
||||
ansible.builtin.shell: set -o pipefail && cscli machines list -o raw | grep {{ inventory_hostname }} | grep true || echo "Not found"
|
||||
register: _csmachines
|
||||
delegate_to: "{{ crowdsec_delegate_server_hostname }}"
|
||||
changed_when: false
|
||||
|
||||
- block:
|
||||
- name: registering
|
||||
block:
|
||||
- name: Register agent to server
|
||||
ansible.builtin.command: cscli lapi register -u {{ crowdsec_lapi_url }} --machine {{ inventory_hostname }}
|
||||
notify: restart crowdsec
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue