Fix somes lint errors
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Adrien Reslinger 2022-08-17 23:28:11 +02:00
parent 18e86f8687
commit d4e8f60fe9
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
3 changed files with 5 additions and 4 deletions

View file

@ -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 }}"

View file

@ -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

View file

@ -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