28 lines
		
	
	
	
		
			718 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			718 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| - name: Ensure Prosody is installed
 | |
|   ansible.builtin.apt:
 | |
|     name: "{{ prosody_package }}"
 | |
|     state: present
 | |
|     update_cache: yes
 | |
| 
 | |
| - name: Deploy Prosody config
 | |
|   ansible.builtin.template:
 | |
|     src: prosody.cfg.lua.j2
 | |
|     dest: /etc/prosody/prosody.cfg.lua
 | |
|     owner: root
 | |
|     group: root
 | |
|     mode: "0644"
 | |
|   notify: Restart Prosody
 | |
| 
 | |
| - name: Ensure Prosody is up and running
 | |
|   ansible.builtin.systemd:
 | |
|     name: prosody
 | |
|     state: started
 | |
|     enabled: yes
 | |
| 
 | |
| - name: Create XMPP admin user
 | |
|   ansible.builtin.expect:
 | |
|     command: prosodyctl adduser admin@{{ xmpp_domain }}
 | |
|     responses:
 | |
|       "Enter new password:": "{{ xmpp_admin_password }}"
 | |
|       "Retype new password:": "{{ xmpp_admin_password }}"
 | |
|     become: yes
 | 
