mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
Update avahi.yml
This commit is contained in:
parent
31388eee9d
commit
62e1a07e53
1 changed files with 32 additions and 25 deletions
|
@ -1,40 +1,47 @@
|
||||||
- name: Create a user for avahi
|
- name: Create a user for avahi (debuntu)
|
||||||
user: name=avahi
|
user:
|
||||||
createhome=no
|
name: avahi
|
||||||
shell=/bin/false
|
createhome: no
|
||||||
|
shell: /bin/false
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Install avahi announce config files
|
- name: Install avahi announce config file /etc/avahi/services/schoolserver.service
|
||||||
template: src=avahi/schoolserver.service
|
template:
|
||||||
dest=/etc/avahi/services/schoolserver.service
|
src: avahi/schoolserver.service
|
||||||
owner=avahi
|
dest: /etc/avahi/services/schoolserver.service
|
||||||
group=avahi
|
owner: avahi
|
||||||
mode=0640
|
group: avahi
|
||||||
|
mode: 0640
|
||||||
when: 'gui_wan == True'
|
when: 'gui_wan == True'
|
||||||
|
|
||||||
- name: Find a clean copy of ssh.service
|
- name: Find avahi_ver for clean copy of ssh.service (not debuntu)
|
||||||
shell: "ls /usr/share/doc/ |grep avahi | head -n1"
|
shell: "ls /usr/share/doc/ | grep avahi | head -n1"
|
||||||
register: avahi_ver
|
register: avahi_ver
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
when: not is_debuntu
|
||||||
|
|
||||||
- name: Grab a clean copy of ssh.service
|
- name: Grab a clean copy of ssh.service (not debuntu)
|
||||||
copy: src='/usr/share/doc/{{ avahi_ver.stdout }}/ssh.service'
|
copy:
|
||||||
dest='/etc/avahi/services/'
|
src: '/usr/share/doc/{{ avahi_ver.stdout }}/ssh.service'
|
||||||
|
dest: /etc/avahi/services/
|
||||||
when: avahi_ver.stdout != "" and not is_debuntu
|
when: avahi_ver.stdout != "" and not is_debuntu
|
||||||
|
|
||||||
- name: Grab a clean copy of ssh.service
|
- name: Grab a clean copy of ssh.service (debuntu)
|
||||||
copy: src='/usr/share/doc/avahi-daemon/examples/ssh.service'
|
copy:
|
||||||
dest='/etc/avahi/services/'
|
src: /usr/share/doc/avahi-daemon/examples/ssh.service
|
||||||
|
dest: /etc/avahi/services/
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Set ssh port for avahi
|
- name: Set ssh port for avahi
|
||||||
lineinfile: dest=/etc/avahi/services/ssh.service
|
lineinfile:
|
||||||
regexp='</port>$'
|
dest: /etc/avahi/services/ssh.service
|
||||||
line=' <port>{{ ssh_port }}</port>'
|
regexp: '</port>$'
|
||||||
state=present
|
line: ' <port>{{ ssh_port }}</port>'
|
||||||
backrefs=yes
|
state: present
|
||||||
|
backrefs: yes
|
||||||
|
|
||||||
- name: Enable avahi service
|
- name: Enable avahi service
|
||||||
service: name=avahi-daemon
|
service:
|
||||||
enabled=yes
|
name: avahi-daemon
|
||||||
|
enabled: yes
|
||||||
|
|
Loading…
Reference in a new issue