Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ enable_list: # These are opt-in rules
- no-same-owner

skip_list:
- fqcn
- ignore-errors
- name[missing]
- no-changed-when
- name[missing]
- role-name[path]
- fqcn
- var-naming[no-role-prefix]

warn_list:
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
**.sw[nop]
*~
**/Docker
ansible_collections
Dockerfile
README.md
rhosts.sample
Expand Down
2 changes: 1 addition & 1 deletion filter_plugins/git_log_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

'''
git log filter. Use this to view documentation:
ansible-doc -t filter mythtv.general.git_log_info
ansible-doc -t filter git_log_info
'''


Expand Down
6 changes: 3 additions & 3 deletions filter_plugins/git_log_info.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
DOCUMENTATION:
name: mythtv.general.git_log_info
name: git_log_info
author: Bill Meek
short_description: Get some git info about the playbook or a single file
description:
Expand Down Expand Up @@ -28,11 +28,11 @@ DOCUMENTATION:
EXAMPLES: |
- name: "get a file's short SHA1, author and timestamp"
ansible.builtin.debug:
var: "{{ some_file_name | mythtv.general.git_log_info('full') }}"
var: "{{ some_file_name | git_log_info('full') }}"

- name: "get the long SHA1 for the MythTV playbook (HEAD)"
ansible.builtin.debug:
var: "{{ 'HEAD' | mythtv.general.git_log_info('playbook') }}"
var: "{{ 'HEAD' | git_log_info('playbook') }}"

RETURN:
_output:
Expand Down
12 changes: 6 additions & 6 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---

ansible_managed_sharp: "
#\n
# Ansible managed file. Edit on host: {{ template_host }}!\n
# File Name: {{ template_fullpath }}\n
# Latest commit: {{ template_fullpath | mythtv.general.git_log_info('full') }}\n
#\n"
local_ansible_managed: "
\n
Ansible managed file. Edit on host: {{ template_host }}!\n
File Name: {{ template_fullpath }}\n
Latest commit: {{ template_fullpath | git_log_info('full') }}\n
\n"

# Text for manual action items:
manual_action_text: 'MANUAL ACTION REQUIRED'
Expand Down
26 changes: 15 additions & 11 deletions library/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,33 @@ def run_module():
''' Update with real module information. '''

module_args = {
"api_port": {"type": 'int', "required": False, "default": 6544},
"host": {"type": 'str', "required": False, "default": 'localhost'},
'api_port': {
'type': 'int',
'required': False,
'default': 6544
},
'host': {
'type': 'str',
'required': False,
'default': 'localhost'
},
}

result = {'changed': False}

module = AnsibleModule(
argument_spec=module_args,
supports_check_mode=True
)

module = AnsibleModule(argument_spec=module_args, supports_check_mode=True)

result = {'changed': False}

# In the check mode, really a sanity test of this module.
if module.check_mode:
result['changed'] = True
result['comment'] = 'check mode ran'
module.exit_json(**result)

# Do something(s) here and resurn result information.

result['changed'] = True
result['comment'] = 'library/sample.py ran'
result['host'] = module.params['host']
result['port'] = module.params['api_port']
result['api_port'] = module.params['api_port']

module.exit_json(**result)

Expand Down
27 changes: 16 additions & 11 deletions library/sample.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
DOCUMENTATION:
module: mythtv.general.sample
module: sample
plugin_type: module
author: Bill Meek
short_description: Enter something short here
description:
- Enter the real long description here.
options:
some_option:
description: some need for an integer
api_port:
description: some integer
default: 1234
type: int
required: true
Expand All @@ -20,28 +20,33 @@ DOCUMENTATION:

EXAMPLES: |
- name: do something
mythtv.general.sample:
sample:

- name: do something with some parameters
mythtv.general.sample:
sample:
host: some_hostname
some_option: 5678
api_port: 5678

RETURN:
changed:
description: if true, the attempt worked
type: bool
returned: always
sample: true
failed:
description: common task message
type: bool
returned: always
sample: false
comment:
description: explanatory of result text
type: str
returned: always
sample: "Success, all done!"
host:
description: some hostname
type: str
returned: always, except in check mode
sample: "hostname"
api_port:
description: port number
type: int
returned: always, except in check mode
sample: "3456"

# vim: set expandtab tabstop=2 shiftwidth=2 smartindent noautoindent colorcolumn=80:
121 changes: 121 additions & 0 deletions roles/mythtv/vars/debian/14.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# TASK [common : Please include the following with any issues or questions] ****************
# [localhost] => {
# "msg": [
# "inventory_hostname: localhost",
# "ansible_distribution: Debian",
# "ansible_distribution_release: forky", <----------
# "ansible_distribution_major_version: n/a", <----------
# "ansible_lsb.major_release: n/a",
# "ansible_pkg_mgr: apt",
# "ansible_version.full: 2.Need version"

---

packages:
- git
- g++
- make
- build-essential
- nasm
- automake
- libtool
- ccache
- pkg-config
- cmake
- patch
- ninja-build
- gperf
- meson
- php
- uuid-dev
- libfreetype6-dev
- libmp3lame-dev
- libxv-dev
- libxxf86vm-dev
- libxinerama-dev
- libxrandr-dev
- libxml2-dev
- libavahi-compat-libdnssd-dev
- libexiv2-dev
- libasound2-dev
- libegl1-mesa-dev
- liblzo2-dev
- libhdhomerun-dev
- libsamplerate0-dev
- libxnvctrl-dev
- libzip-dev
- libmpeg2-4-dev
- libsoundtouch-dev
- libv4l-dev
- libva-dev
- libdrm-dev
- libvdpau-dev
- libass-dev
- libxvidcore-dev
- libx264-dev
- libvpx-dev
- libbluray-bdj
- libavc1394-dev
- libiec61883-dev
- libpulse-dev
- libfftw3-dev
- libssl-dev
- libsystemd-dev
- libgnutls28-dev
- libdbi-perl
- libdbd-mysql-perl
- libnet-upnp-perl
- libwww-perl
- libio-socket-inet6-perl
- libdate-manip-perl
- libxml-simple-perl
- libxml-xpath-perl
- libimage-size-perl
- libdatetime-format-iso8601-perl
- libsoap-lite-perl
- libjson-perl
- libfindbin-libs-perl
- perl-modules
- libvorbis-dev
- libflac-dev
- libflac++-dev
- libtag1-dev
- libcdio-dev
- libcdio-paranoia-dev
- libtool-bin
- sqlite3
- libsqlite3-dev
- libcec-dev
- libbluray-dev
- libx265-dev
- default-libmysqlclient-dev
- libmariadb-dev-compat
- python3-oauthlib
- python3-pycurl
- python3-requests
- python3-requests-cache
- python3-lxml
- python3-mysqldb
- python3-setuptools
- python3-venv
- python3-virtualenv
- python3-dev
- python3-pip
- libminizip-dev

qt5_packages:
- libqt5core5a
- libqt5opengl5-dev
- libqt5script5
- qtscript5-dev
- qt5-qmake
- libqt5sql5-mysql
- qtwebengine5-dev

qt6_packages:
- qt6-base-dev
- qt6-webengine-dev

...

# vim: set expandtab tabstop=2 shiftwidth=2 smartindent noautoindent colorcolumn=4:
1 change: 1 addition & 0 deletions roles/mythtv/vars/debian/forky.yml
1 change: 0 additions & 1 deletion roles/mythtv/vars/netbsd/10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,3 @@ qt6_packages:
# - qt6-base_sqldriver-sqlite

...

1 change: 0 additions & 1 deletion roles/mythtv/vars/openbsd/7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,3 @@ qt6_packages:
- qt6-qtwebview

...

7 changes: 4 additions & 3 deletions roles/python/tasks/python-venv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
- discovered_interpreter_python is undefined
- ansible_facts["python.executable"] is defined

- fail:
- name: "python-venv | Abort if a Python interpreter can't be found"
fail:
msg: "Python executable not found, aborting."
failed_when: using_python_version is undefined

Expand All @@ -37,10 +38,10 @@
debug:
msg: >-
A Python Virtual Environment was created. Before building MythTV,
do: export VIRTUAL_ENV={{ venv_path | expanduser }} first. Then
do: export VIRTUAL_ENV=/{{ venv_path | expanduser }} first. Then
run cmake or make as usual. Remember to change the shebang of any
personal Python programs that import the MythTV module to:
#!{{ venv_path | expanduser }}/bin/python
#!/{{ venv_path | expanduser }}/bin/python
when: not command_result.failed or
(command_result.rc is defined and command_result.rc == 0)

Expand Down