Cleanup empty lines at beginning of file

This commit is contained in:
Alexander Grothe 2017-06-20 16:19:08 +02:00
parent 5e5f9f346a
commit ddf59c34f1
46 changed files with 899 additions and 958 deletions

View File

@ -1,4 +1,3 @@
# file: group_vars/all # file: group_vars/all
# this is the standard text to put in templates # this is the standard text to put in templates

View File

@ -1,4 +1,3 @@
- name: Restart Samba - name: Restart Samba
systemd: systemd:
name: smbd.service name: smbd.service

View File

@ -1,5 +1,4 @@
#!/bin/bash #!/bin/bash
if (( $EUID != 0 )); then if (( $EUID != 0 )); then
echo "This script must be run using sudo or as root" echo "This script must be run using sudo or as root"
exit exit

View File

@ -1,15 +1,14 @@
#!/usr/bin/env python
#!/usr/bin/env python # This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules.
DOCUMENTATION = '''
# This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules. ---
DOCUMENTATION = ''' module: hardware_facts
--- short_description: collects facts for kernel modules, usb and pci devices
module: hardware_facts description:
short_description: collects facts for kernel modules, usb and pci devices
description:
- This Module collects the vendor- and device ids for USB- and PCI(e)-devices and - This Module collects the vendor- and device ids for USB- and PCI(e)-devices and
currently loaded kernel modules. currently loaded kernel modules.
options: options:
usb: usb:
required: False required: False
default: True default: True
@ -33,42 +32,42 @@ options:
default: True default: True
description: description:
- return a list of devices of the pci gpu class (0x030000) - return a list of devices of the pci gpu class (0x030000)
notes: notes:
- requres python-pyusb and python-kmodpy - requres python-pyusb and python-kmodpy
requirements: [ ] requirements: [ ]
author: "Alexander Grothe <seahawk1986@gmx.de>" author: "Alexander Grothe <seahawk1986@gmx.de>"
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: get information about usb and pci hardware and loaded kernel modules - name: get information about usb and pci hardware and loaded kernel modules
hardware_facts: hardware_facts:
usb: True usb: True
pci: True pci: True
modules: True modules: True
- debug: - debug:
var: usb var: usb
- debug - debug
var: pci var: pci
- debug - debug
var: modules var: modules
- debug - debug
var: gpus var: gpus
''' '''
import glob import glob
import json import json
import os import os
import sys import sys
import usb.core import usb.core
from collections import namedtuple from collections import namedtuple
import kmodpy import kmodpy
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
PCIDevice = namedtuple("PCIDevice", 'idVendor idProduct idClass pciPath') PCIDevice = namedtuple("PCIDevice", 'idVendor idProduct idClass pciPath')
def get_pci_devices(): def get_pci_devices():
for device in glob.glob('/sys/devices/pci*/*:*:*/'): for device in glob.glob('/sys/devices/pci*/*:*:*/'):
with open(os.path.join(device, 'device')) as d: with open(os.path.join(device, 'device')) as d:
product_id = int(d.read().strip(), 16) product_id = int(d.read().strip(), 16)
@ -78,17 +77,17 @@ def get_pci_devices():
class_id = int(d.read().strip(), 16) class_id = int(d.read().strip(), 16)
yield PCIDevice(idVendor=vendor_id, idProduct=product_id, idClass=class_id, pciPath=device) yield PCIDevice(idVendor=vendor_id, idProduct=product_id, idClass=class_id, pciPath=device)
def format_device_list(iterator): def format_device_list(iterator):
return ["{:04x}:{:04x}".format(d.idVendor, d.idProduct) for d in iterator] return ["{:04x}:{:04x}".format(d.idVendor, d.idProduct) for d in iterator]
def format_gpu_device_list(iterator): def format_gpu_device_list(iterator):
def get_entries(iterator): def get_entries(iterator):
for d in iterator: for d in iterator:
if d.idClass == 0x030000: if d.idClass == 0x030000:
yield ("{:04x}:{:04x}".format(d.idVendor, d.idProduct)) yield ("{:04x}:{:04x}".format(d.idVendor, d.idProduct))
return [entry for entry in get_entries(iterator)] return [entry for entry in get_entries(iterator)]
arg_specs = { arg_specs = {
'usb': dict(default=True, type='bool', required=False), 'usb': dict(default=True, type='bool', required=False),
'pci': dict(default=True, type='bool', required=False), 'pci': dict(default=True, type='bool', required=False),
'modules': dict(default=True, type='bool', required=False), 'modules': dict(default=True, type='bool', required=False),
@ -96,7 +95,7 @@ arg_specs = {
} }
def main(): def main():
module = AnsibleModule(argument_spec=arg_specs, supports_check_mode=True,) module = AnsibleModule(argument_spec=arg_specs, supports_check_mode=True,)
collect_usb = module.params['usb'] collect_usb = module.params['usb']
collect_pci = module.params['pci'] collect_pci = module.params['pci']
@ -123,5 +122,5 @@ def main():
module.exit_json(changed=False, ansible_facts=data, msg=data) module.exit_json(changed=False, ansible_facts=data, msg=data)
if __name__ == '__main__': if __name__ == '__main__':
main() main()

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
DOCUMENTATION = ''' DOCUMENTATION = '''

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
from __future__ import print_function from __future__ import print_function
import ast import ast

View File

@ -1,3 +1,2 @@
[localhost] [localhost]
localhost connection=local localhost connection=local

View File

@ -1,4 +1,3 @@
--- ---
# file roles/autoinstall-dvbhddevice/tasks/main.yml # file roles/autoinstall-dvbhddevice/tasks/main.yml

View File

@ -1,4 +1,3 @@
--- ---
# file roles/autoinstall-dvbsddevice/tasks/main.yml # file roles/autoinstall-dvbsddevice/tasks/main.yml

View File

@ -1,4 +1,3 @@
--- ---
# file roles/autoinstall-imonlcd/tasks/main.yml # file roles/autoinstall-imonlcd/tasks/main.yml

View File

@ -1,4 +1,3 @@
--- ---
# file roles/autoinstall-libcec-daemon/tasks/main.yml # file roles/autoinstall-libcec-daemon/tasks/main.yml

View File

@ -1,4 +1,3 @@
--- ---
# file roles/autoinstall-pvr350/tasks/main.yml # file roles/autoinstall-pvr350/tasks/main.yml

View File

@ -1,4 +1,3 @@
--- ---
# file roles/autoinstall-satip/tasks/main.yml # file roles/autoinstall-satip/tasks/main.yml

View File

@ -1,4 +1,3 @@
--- ---
# file roles/autoinstall-targavfd/tasks/main.yml # file roles/autoinstall-targavfd/tasks/main.yml

View File

@ -1,17 +1,16 @@
---
# file roles/autoinstall-ubuntu-drivers/tasks/main.yml
--- - name: apt | install ubuntu-drivers-common
# file roles/autoinstall-ubuntu-drivers/tasks/main.yml
- name: apt | install ubuntu-drivers-common
apt: apt:
name: ubuntu-drivers-common name: ubuntu-drivers-common
state: present state: present
- name: ensure /etc/yavdr exists - name: ensure /etc/yavdr exists
file: file:
path: /etc/yavdr path: /etc/yavdr
state: directory state: directory
mode: 0755 mode: 0755
- name: let ubuntu-drivers automatically install additional drivers - name: let ubuntu-drivers automatically install additional drivers
command: ubuntu-drivers --package-list /etc/yavdr/autoinstalled autoinstall command: ubuntu-drivers --package-list /etc/yavdr/autoinstalled autoinstall

View File

@ -1,4 +1,3 @@
--- ---
# file: roles/dvd/tasks/main.yml # file: roles/dvd/tasks/main.yml

View File

@ -1,4 +1,3 @@
system: system:
shutdown: poweroff shutdown: poweroff
grub: grub:

View File

@ -1,4 +1,3 @@
- name: Update GRUB - name: Update GRUB
command: update-grub command: update-grub
failed_when: ('error' in grub_register_update.stderr) failed_when: ('error' in grub_register_update.stderr)

View File

@ -1,4 +1,3 @@
- name: custom grub configuration for timeout and reboot halt - name: custom grub configuration for timeout and reboot halt
template: template:
src: templates/50_custom.j2 src: templates/50_custom.j2

View File

@ -1,4 +1,3 @@
#!/bin/sh #!/bin/sh
exec tail -n +3 $0 exec tail -n +3 $0

View File

@ -1,4 +1,3 @@
--- ---
- name: change udev rule to allow KODI to eject optical disks - name: change udev rule to allow KODI to eject optical disks

View File

@ -1,4 +1,3 @@
[Unit] [Unit]
Description=Start kodi in user session Description=Start kodi in user session

View File

@ -1,4 +1,3 @@
- name: install nfs server packages - name: install nfs server packages
apt: apt:
name: '{{ item }}' name: '{{ item }}'

View File

@ -1,5 +1,4 @@
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}) {% for name, path in media_dirs.iteritems() %}
{% for name, path in media_dirs.iteritems() %} {{ path }} *(rw,fsid={{ loop.index }},sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}{{ ',insecure' if nfs.insecure else '' }})
{{ path }} *(rw,fsid={{ loop.index }},sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}{{ ',insecure' if nfs.insecure else '' }}) {% endfor %}
{% endfor %}

View File

@ -1,4 +1,3 @@
# file: roles/samba-config/tasks/main.yml # file: roles/samba-config/tasks/main.yml
# TODO: # TODO:

View File

@ -1,4 +1,3 @@
{{ ansible_managed_file | comment }} {{ ansible_managed_file | comment }}
#======================= Global Settings ======================= #======================= Global Settings =======================

View File

@ -1,4 +1,3 @@
# file: roles/samba-install/tasks/main.yml # file: roles/samba-install/tasks/main.yml
- name: install samba server - name: install samba server

View File

@ -1,4 +1,3 @@
foo: foo:
- bar - bar
- baz - baz

View File

@ -1,4 +1,3 @@
--- ---
- name: show vars - name: show vars
debug: debug:

View File

@ -1,5 +0,0 @@
vars:
foo:
- bar
- baz
- spam

View File

@ -1,4 +1,3 @@
--- ---
# file: roles/vdr/tasks/main.yml # file: roles/vdr/tasks/main.yml

View File

@ -1,4 +1,3 @@
--- ---
# file: roles/yavdr-common/defaults/main.yml # file: roles/yavdr-common/defaults/main.yml
@ -14,7 +13,7 @@ drivers:
sundtek: auto sundtek: auto
ddvb-dkms: auto ddvb-dkms: auto
extra_packages: extra_packages:
- vim - vim
- tree - tree
- w-scan - w-scan

View File

@ -1,4 +0,0 @@
// {{ ansible_managed_file }}
// Recommends are as of now still abused in many packages
APT::Install-Recommends "0";
APT::Install-Suggests "0";

View File

@ -1,4 +1,3 @@
- name: apt | prevent automatic installation of recommended packages - name: apt | prevent automatic installation of recommended packages
template: template:
src: templates/90-norecommends.j2 src: templates/90-norecommends.j2

View File

@ -1,4 +1,3 @@
{{ ansible_managed_file | comment('c') }} {{ ansible_managed_file | comment('c') }}
// Recommends are as of now still abused in many packages // Recommends are as of now still abused in many packages
APT::Install-Recommends "0"; APT::Install-Recommends "0";

View File

@ -1,2 +1 @@
install_avahi: true install_avahi: true

View File

@ -1,4 +1,3 @@
--- ---
# this playbook sets up network services for a yaVDR installation # this playbook sets up network services for a yaVDR installation

View File

@ -1,4 +1,3 @@
--- ---
# file: roles/yavdr-xorg/tasks/main.yml # file: roles/yavdr-xorg/tasks/main.yml

View File

@ -1,4 +1,3 @@
#!/bin/bash #!/bin/bash
# {{ ansible_managed_file }} # {{ ansible_managed_file }}
exec openbox-session exec openbox-session

View File

@ -1,4 +1,3 @@
env | grep "DISPLAY\|DBUS_SESSION_BUS_ADDRESS\|XDG_RUNTIME_DIR" > ~/.session-env env | grep "DISPLAY\|DBUS_SESSION_BUS_ADDRESS\|XDG_RUNTIME_DIR" > ~/.session-env
systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> <openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- Do not edit this file, it will be overwritten on install. <!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. --> Copy the file to $HOME/.config/openbox/ instead. -->
<resistance> <resistance>
<strength>10</strength> <strength>10</strength>
@ -792,7 +792,7 @@
</application> </application>
# end of the example # end of the example
--> -->
<applications> <applications>
<application title="softhddevice"> <application title="softhddevice">
<decor>no</decor> <decor>no</decor>
@ -813,4 +813,4 @@
<skip_taskbar>yes</skip_taskbar> <skip_taskbar>yes</skip_taskbar>
</application> </application>
</applications> </applications>
</openbox_config> </openbox_config>

View File

@ -1,4 +1,3 @@
# file: roles/yavdr-xorg/templates/vdr-xorg.conf # file: roles/yavdr-xorg/templates/vdr-xorg.conf
# {{ ansible_managed_file }} # {{ ansible_managed_file }}

View File

@ -1,8 +0,0 @@
[Unit]
Description=X with verbose logging on %I
Wants=graphical.target
Before=graphical.target
[Service]
Type=forking
ExecStart=/usr/bin/x-daemon -logverbose 6 -noreset %I

View File

@ -1,4 +1,3 @@
[Unit] [Unit]
Description=X with verbose logging on %I Description=X with verbose logging on %I
Wants=graphical.target Wants=graphical.target

View File

@ -1,4 +1,3 @@
[Unit] [Unit]
Description=yaVDR Desktop Description=yaVDR Desktop
Requires=default.target Requires=default.target

View File

@ -1,4 +1,3 @@
--- ---
# file: yavdr07.yml # file: yavdr07.yml
# this playbook sets up a complete yaVDR 0.7 installation # this playbook sets up a complete yaVDR 0.7 installation