fixed typo in a line substitution, added SystemD restart tasks for service to abide by configuration changes
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
- name: Restarting SystemD service
|
||||||
|
become: true
|
||||||
|
ansible.builtin.systemd_service:
|
||||||
|
name: crowdsec
|
||||||
|
scope: system
|
||||||
|
enabled: true
|
||||||
|
state: started
|
||||||
- name: Changing the address and port of the Crowdsec server
|
- name: Changing the address and port of the Crowdsec server
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
@@ -11,7 +18,7 @@
|
|||||||
become: true
|
become: true
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/crowdsec/config.yaml
|
path: /etc/crowdsec/config.yaml
|
||||||
regexp: "^ {2}listen_uri"
|
regexp: "^ {2}listen_addr"
|
||||||
line: " listen_addr: localhost"
|
line: " listen_addr: localhost"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@@ -24,4 +31,10 @@
|
|||||||
line: "url: http://localhost:{{ crowdsec.port }}"
|
line: "url: http://localhost:{{ crowdsec.port }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "644"
|
mode: "644"
|
||||||
|
- name: Restarting SystemD service
|
||||||
|
become: true
|
||||||
|
ansible.builtin.systemd_service:
|
||||||
|
name: crowdsec
|
||||||
|
scope: system
|
||||||
|
state: restarted
|
||||||
Reference in New Issue
Block a user