Skip to content

Commit d2d51c7

Browse files
author
Bill Meek
committed
Single Role: be sure to convert version numbers to ints
Also rework the flattening of lists.
1 parent 43eff4e commit d2d51c7

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

Docker/centos:8.Dockerfile

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM quay.io/centos/centos:stream
22
ARG NOBUILD=0
3+
LABEL EOL="31 Dec 2021"
34
LABEL DERIVEDFROM="RHEL 8 Public Upstream Development Branch"
4-
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
5+
RUN sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
56
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
67
&& dnf makecache \
78
&& dnf --assumeyes install epel-release \
@@ -13,19 +14,19 @@ RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
1314

1415
WORKDIR /root/source/ansible
1516
COPY . ./
16-
RUN ./mythtv.yml --limit=localhost --extra-vars='{"venv_active": true}' --extra-vars='{"use_old_roles": false}'
17-
18-
WORKDIR /root/source
19-
RUN git clone https://github.com/MythTV/mythtv.git
20-
21-
# buld fails because FFmpeg can't find libiec61883 (even though it and
22-
# libiec61883-devel are installed
23-
WORKDIR /root/source/mythtv
24-
25-
RUN if [ "${NOBUILD}" -eq 1 ]; then \
26-
echo "Not doing a build." ;\
27-
else \
28-
git checkout fixes/35 \
29-
&& cmake --preset qt5 \
30-
&& VIRTUAL_ENV=/usr/local/dist cmake --build build-qt5 ;\
31-
fi
17+
# RUN ./mythtv.yml --limit=localhost --extra-vars='{"venv_active": true}' --extra-vars='{"use_old_roles": false}'
18+
#
19+
# WORKDIR /root/source
20+
# RUN git clone https://github.com/MythTV/mythtv.git
21+
#
22+
# # buld fails because FFmpeg can't find libiec61883 (even though it and
23+
# # libiec61883-devel are installed
24+
# WORKDIR /root/source/mythtv
25+
#
26+
# RUN if [ "${NOBUILD}" -eq 1 ]; then \
27+
# echo "Not doing a build." ;\
28+
# else \
29+
# git checkout fixes/35 \
30+
# && cmake --preset qt5 \
31+
# && VIRTUAL_ENV=/usr/local/dist cmake --build build-qt5 ;\
32+
# fi

roles/mythtv/tasks/main.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
set_fact:
1111
sr_pkgmgr: '{{ ansible_pkg_mgr }}'
1212
sr_distro: '{{ ansible_distribution | regex_replace("[/ ]", "_") | lower }}'
13-
sr_versno: '{{ ansible_distribution_major_version }}'
13+
sr_versno: '{{ ansible_distribution_major_version | int }}'
1414
sr_dir: '{{ playbook_dir }}/roles/mythtv'
1515

1616
- name: Set version to rolling for Archlinux and SUSE Tumbleweed
@@ -21,9 +21,7 @@
2121
- name: If a Debian version is not numeric, use its codename as a version
2222
set_fact:
2323
sr_versno: '{{ ansible_distribution_release | lower }}'
24-
when:
25-
- ansible_distribution == 'Debian'
26-
- ansible_distribution_major_version | type_debug != "int"
24+
when: sr_distro == 'debian' and (sr_versno == 0)
2725

2826
- name: See if special setup tasks exist
2927
stat:
@@ -74,13 +72,17 @@
7472
- '{{ qt6_packages }}'
7573
when: qt6 is defined and qt6 and qt6_packages is defined
7674

75+
- name: Flatten package lists
76+
set_fact:
77+
packages: '{{ packages | flatten() }}'
78+
7779
- name: Final package list
7880
debug:
79-
var: lookup('flattened', packages)
81+
msg: 'FPL={{ packages }}'
8082

8183
- name: Install the packages
8284
package:
83-
name: "{{ lookup('flattened', packages) }}"
85+
name: '{{ packages }}'
8486

8587
...
8688

0 commit comments

Comments
 (0)