Fix for voidlinux

This commit is contained in:
Daniel A. Maierhofer
2018-03-17 17:28:06 +01:00
parent 25163846b2
commit cb190efd2c
5 changed files with 31 additions and 1 deletions

View File

@@ -2,7 +2,8 @@
- name: set locales - name: set locales
locale_gen: name="{{ item.name }}" state="{{ item.state | default('present') }}" locale_gen: name="{{ item.name }}" state="{{ item.state | default('present') }}"
with_items: "{{ common_locales }}" with_items: "{{ common_locales }}"
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- name: set default locale - name: set default locale
lineinfile: dest="/etc/default/locale" regexp="LANG=" line="LANG={{ common_locales_default }}" lineinfile: dest="/etc/default/locale" regexp="LANG=" line="LANG={{ common_locales_default }}"
when: common_locales_default when: common_locales_default and (ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu')

View File

@@ -44,3 +44,7 @@
- include_tasks: rcfiles.yml - include_tasks: rcfiles.yml
when: common_rcfiles when: common_rcfiles
tags: ['common', 'rcfiles'] tags: ['common', 'rcfiles']
- include_tasks: tty.yml
when: common_tty
tags: ['common', 'tty']

View File

@@ -1,9 +1,19 @@
--- ---
- name: openssh - install - name: openssh - install
package: name=openssh-server package: name=openssh-server
when: ansible_os_family == "Debian"
- name: openssh - install
package: name=openssh
when: ansible_os_family != "Debian"
- name: openssh - start and enable - name: openssh - start and enable
service: name=ssh state=started enabled=yes service: name=ssh state=started enabled=yes
when: ansible_os_family == "Debian"
- name: openssh - start and enable
service: name=sshd state=started enabled=yes
when: ansible_os_family != "Debian"
- name: openssh - config - name: openssh - config
template: template:

View File

@@ -17,3 +17,8 @@
- name: rsyslog - start and enable - name: rsyslog - start and enable
service: name=rsyslog state=started enabled=yes service: name=rsyslog state=started enabled=yes
when: ansible_os_family == "Debian"
- name: rsyslog - start and enable
service: name=rsyslogd state=started enabled=yes
when: ansible_os_family != "Debian"

10
tasks/tty.yml Normal file
View File

@@ -0,0 +1,10 @@
---
- name: tty - disable all but one
service: name="{{ item }}" enabled=no
when: ansible_os_family != "Debian"
with_items:
- agetty-tty2
- agetty-tty3
- agetty-tty4
- agetty-tty5
- agetty-tty6