Cleanup empty lines at beginning of file
This commit is contained in:
parent
5e5f9f346a
commit
ddf59c34f1
@ -1,4 +1,3 @@
|
||||
|
||||
# file: group_vars/all
|
||||
|
||||
# this is the standard text to put in templates
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
- name: Restart Samba
|
||||
systemd:
|
||||
name: smbd.service
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (( $EUID != 0 )); then
|
||||
echo "This script must be run using sudo or as root"
|
||||
exit
|
||||
|
@ -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 = '''
|
||||
---
|
||||
module: hardware_facts
|
||||
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 currently loaded kernel modules.
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: hardware_facts
|
||||
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
|
||||
currently loaded kernel modules.
|
||||
options:
|
||||
options:
|
||||
usb:
|
||||
required: False
|
||||
default: True
|
||||
@ -33,42 +32,42 @@ options:
|
||||
default: True
|
||||
description:
|
||||
- return a list of devices of the pci gpu class (0x030000)
|
||||
notes:
|
||||
notes:
|
||||
- requres python-pyusb and python-kmodpy
|
||||
requirements: [ ]
|
||||
author: "Alexander Grothe <seahawk1986@gmx.de>"
|
||||
'''
|
||||
requirements: [ ]
|
||||
author: "Alexander Grothe <seahawk1986@gmx.de>"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: get information about usb and pci hardware and loaded kernel modules
|
||||
EXAMPLES = '''
|
||||
- name: get information about usb and pci hardware and loaded kernel modules
|
||||
hardware_facts:
|
||||
usb: True
|
||||
pci: True
|
||||
modules: True
|
||||
- debug:
|
||||
- debug:
|
||||
var: usb
|
||||
- debug
|
||||
- debug
|
||||
var: pci
|
||||
- debug
|
||||
- debug
|
||||
var: modules
|
||||
- debug
|
||||
- debug
|
||||
var: gpus
|
||||
'''
|
||||
'''
|
||||
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import usb.core
|
||||
from collections import namedtuple
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import usb.core
|
||||
from collections import namedtuple
|
||||
|
||||
import kmodpy
|
||||
from ansible.module_utils.basic import *
|
||||
import kmodpy
|
||||
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*/*:*:*/'):
|
||||
with open(os.path.join(device, 'device')) as d:
|
||||
product_id = int(d.read().strip(), 16)
|
||||
@ -78,17 +77,17 @@ def get_pci_devices():
|
||||
class_id = int(d.read().strip(), 16)
|
||||
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]
|
||||
|
||||
def format_gpu_device_list(iterator):
|
||||
def format_gpu_device_list(iterator):
|
||||
def get_entries(iterator):
|
||||
for d in iterator:
|
||||
if d.idClass == 0x030000:
|
||||
yield ("{:04x}:{:04x}".format(d.idVendor, d.idProduct))
|
||||
return [entry for entry in get_entries(iterator)]
|
||||
|
||||
arg_specs = {
|
||||
arg_specs = {
|
||||
'usb': dict(default=True, type='bool', required=False),
|
||||
'pci': 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,)
|
||||
collect_usb = module.params['usb']
|
||||
collect_pci = module.params['pci']
|
||||
@ -123,5 +122,5 @@ def main():
|
||||
module.exit_json(changed=False, ansible_facts=data, msg=data)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
#!/usr/bin/env python2
|
||||
|
||||
DOCUMENTATION = '''
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
#!/usr/bin/env python2
|
||||
from __future__ import print_function
|
||||
import ast
|
||||
|
@ -1,3 +1,2 @@
|
||||
|
||||
[localhost]
|
||||
localhost connection=local
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file roles/autoinstall-dvbhddevice/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file roles/autoinstall-dvbsddevice/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file roles/autoinstall-imonlcd/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file roles/autoinstall-libcec-daemon/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file roles/autoinstall-pvr350/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file roles/autoinstall-satip/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file roles/autoinstall-targavfd/tasks/main.yml
|
||||
|
||||
|
@ -1,17 +1,16 @@
|
||||
---
|
||||
# file roles/autoinstall-ubuntu-drivers/tasks/main.yml
|
||||
|
||||
---
|
||||
# file roles/autoinstall-ubuntu-drivers/tasks/main.yml
|
||||
|
||||
- name: apt | install ubuntu-drivers-common
|
||||
- name: apt | install ubuntu-drivers-common
|
||||
apt:
|
||||
name: ubuntu-drivers-common
|
||||
state: present
|
||||
|
||||
- name: ensure /etc/yavdr exists
|
||||
- name: ensure /etc/yavdr exists
|
||||
file:
|
||||
path: /etc/yavdr
|
||||
state: directory
|
||||
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
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file: roles/dvd/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
system:
|
||||
shutdown: poweroff
|
||||
grub:
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
- name: Update GRUB
|
||||
command: update-grub
|
||||
failed_when: ('error' in grub_register_update.stderr)
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
- name: custom grub configuration for timeout and reboot halt
|
||||
template:
|
||||
src: templates/50_custom.j2
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
#!/bin/sh
|
||||
exec tail -n +3 $0
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
|
||||
- name: change udev rule to allow KODI to eject optical disks
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[Unit]
|
||||
Description=Start kodi in user session
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
- name: install nfs server packages
|
||||
apt:
|
||||
name: '{{ item }}'
|
||||
|
@ -1,5 +1,4 @@
|
||||
|
||||
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
|
||||
{% 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 '' }})
|
||||
{% endfor %}
|
||||
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
|
||||
{% 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 '' }})
|
||||
{% endfor %}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
# file: roles/samba-config/tasks/main.yml
|
||||
|
||||
# TODO:
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
{{ ansible_managed_file | comment }}
|
||||
|
||||
#======================= Global Settings =======================
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
# file: roles/samba-install/tasks/main.yml
|
||||
|
||||
- name: install samba server
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
foo:
|
||||
- bar
|
||||
- baz
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
- name: show vars
|
||||
debug:
|
||||
|
@ -1,5 +0,0 @@
|
||||
vars:
|
||||
foo:
|
||||
- bar
|
||||
- baz
|
||||
- spam
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file: roles/vdr/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file: roles/yavdr-common/defaults/main.yml
|
||||
|
||||
@ -14,7 +13,7 @@ drivers:
|
||||
sundtek: auto
|
||||
ddvb-dkms: auto
|
||||
|
||||
extra_packages:
|
||||
extra_packages:
|
||||
- vim
|
||||
- tree
|
||||
- w-scan
|
||||
|
@ -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";
|
@ -1,4 +1,3 @@
|
||||
|
||||
- name: apt | prevent automatic installation of recommended packages
|
||||
template:
|
||||
src: templates/90-norecommends.j2
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
{{ ansible_managed_file | comment('c') }}
|
||||
// Recommends are as of now still abused in many packages
|
||||
APT::Install-Recommends "0";
|
||||
|
@ -1,2 +1 @@
|
||||
|
||||
install_avahi: true
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# this playbook sets up network services for a yaVDR installation
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file: roles/yavdr-xorg/tasks/main.yml
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
#!/bin/bash
|
||||
# {{ ansible_managed_file }}
|
||||
exec openbox-session
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
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
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.
|
||||
Copy the file to $HOME/.config/openbox/ instead. -->
|
||||
<resistance>
|
||||
<strength>10</strength>
|
||||
@ -792,7 +792,7 @@
|
||||
</application>
|
||||
|
||||
# end of the example
|
||||
-->
|
||||
-->
|
||||
<applications>
|
||||
<application title="softhddevice">
|
||||
<decor>no</decor>
|
||||
@ -813,4 +813,4 @@
|
||||
<skip_taskbar>yes</skip_taskbar>
|
||||
</application>
|
||||
</applications>
|
||||
</openbox_config>
|
||||
</openbox_config>
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
# file: roles/yavdr-xorg/templates/vdr-xorg.conf
|
||||
# {{ ansible_managed_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
|
@ -1,4 +1,3 @@
|
||||
|
||||
[Unit]
|
||||
Description=X with verbose logging on %I
|
||||
Wants=graphical.target
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
[Unit]
|
||||
Description=yaVDR Desktop
|
||||
Requires=default.target
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
---
|
||||
# file: yavdr07.yml
|
||||
# this playbook sets up a complete yaVDR 0.7 installation
|
||||
|
Loading…
Reference in New Issue
Block a user