33 lines
767 B
YAML
33 lines
767 B
YAML
|
- name: Installation k3s
|
||
|
hosts: "{{ host_prompt }}"
|
||
|
user: "{{ user_prompt }}"
|
||
|
|
||
|
tasks:
|
||
|
- name: install package
|
||
|
become: true
|
||
|
ansible.builtin.package:
|
||
|
name:
|
||
|
- mosquitto
|
||
|
- mosquitto-clients
|
||
|
state: present
|
||
|
|
||
|
- name: configure mosquitto conf
|
||
|
become: true
|
||
|
ansible.builtin.lineinfile:
|
||
|
path: /etc/mosquitto/conf.d/mosquitto.conf
|
||
|
line: allow_anonymous true
|
||
|
create: true
|
||
|
|
||
|
- name: configure mosquitto conf
|
||
|
become: true
|
||
|
ansible.builtin.lineinfile:
|
||
|
path: /etc/mosquitto/conf.d/mosquitto.conf
|
||
|
line: listener 1883 0.0.0.0
|
||
|
|
||
|
- name: restart mosquitto
|
||
|
become: true
|
||
|
ansible.builtin.service:
|
||
|
name: mosquitto
|
||
|
state: restarted
|
||
|
|