init
This commit is contained in:
		
							
								
								
									
										30
									
								
								roles/avahi/tasks/main.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								roles/avahi/tasks/main.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
- name: Populate service facts
 | 
			
		||||
  ansible.builtin.service_facts:
 | 
			
		||||
 | 
			
		||||
- name: Stop and disable systemd-resolved
 | 
			
		||||
  ansible.builtin.systemd:
 | 
			
		||||
    name: systemd-resolved
 | 
			
		||||
    state: stopped
 | 
			
		||||
    enabled: false
 | 
			
		||||
  when: "'systemd-resolved' in services"
 | 
			
		||||
 | 
			
		||||
- name: Install Avahi Daemon and helpers
 | 
			
		||||
  ansible.builtin.apt:
 | 
			
		||||
    name: "{{ item }}"
 | 
			
		||||
    state: latest
 | 
			
		||||
    update_cache: yes
 | 
			
		||||
    install_recommends: no
 | 
			
		||||
  with_items:
 | 
			
		||||
    - avahi-daemon
 | 
			
		||||
    - avahi-utils
 | 
			
		||||
    - libnss-mdns
 | 
			
		||||
  notify: Autoremove and autoclean packages
 | 
			
		||||
 | 
			
		||||
- name: Configure /etc/nsswitch.conf
 | 
			
		||||
  ansible.builtin.copy:
 | 
			
		||||
    src: nsswitch.conf
 | 
			
		||||
    dest: /etc/nsswitch.conf
 | 
			
		||||
    owner: root
 | 
			
		||||
    group: root
 | 
			
		||||
    mode: 0644
 | 
			
		||||
  notify: Restart Avahi Daemon
 | 
			
		||||
		Reference in New Issue
	
	Block a user