Skip to content
Merged
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
6 changes: 3 additions & 3 deletions ansible/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ansible==12.3.0
ansible-lint==26.1.1
pip==26.1
ansible==14.2.0
ansible-lint==26.6.0
pip==26.1.2
2 changes: 1 addition & 1 deletion ansible/roles/bind9/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: Install system packages
apt:
name: "{{ ubuntu_packages }}"
when: ansible_os_family == 'Debian'
when: ansible_facts['os_family'] == 'Debian'

- name: bind9 config
template:
Expand Down
10 changes: 5 additions & 5 deletions ansible/roles/docker_node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker_defaults:
key: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
package_name: docker-ce
package_ver: 5:29.6.1-1~ubuntu.26.04~resolute
repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu {{ ansible_facts['distribution_release'] }} stable
url: https://download.docker.com/linux/ubuntu/gpg
certs:
ca_root: ca-root.pem
Expand Down Expand Up @@ -74,9 +74,9 @@ ubuntu_packages:
ubuntu_repo_uri: http://archive.ubuntu.com/ubuntu/

ubuntu_repos:
- deb {{ ubuntu_repo_uri }} {{ ansible_distribution_release }} main restricted universe multiverse
- deb {{ ubuntu_repo_uri }} {{ ansible_distribution_release }}-updates main restricted universe multiverse
- deb {{ ubuntu_repo_uri }} {{ ansible_distribution_release }}-backports main restricted universe multiverse
- deb {{ ubuntu_repo_uri }} {{ ansible_distribution_release }}-security main restricted universe multiverse
- deb {{ ubuntu_repo_uri }} {{ ansible_facts['distribution_release'] }} main restricted universe multiverse
- deb {{ ubuntu_repo_uri }} {{ ansible_facts['distribution_release'] }}-updates main restricted universe multiverse
- deb {{ ubuntu_repo_uri }} {{ ansible_facts['distribution_release'] }}-backports main restricted universe multiverse
- deb {{ ubuntu_repo_uri }} {{ ansible_facts['distribution_release'] }}-security main restricted universe multiverse

ubuntu_package_additions: []
2 changes: 1 addition & 1 deletion ansible/roles/docker_node/tasks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
mode: 0755
url: https://github.com/docker/compose/releases/download/{{
docker.compose.version }}/docker-compose-Linux-x86_64
when: ansible_distribution_version < '22.04'
when: ansible_facts['distribution_version'] < '22.04'

- name: Sysctl tuning parameters
ansible.builtin.sysctl:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/docker_node/tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
- name: Python pip package
apt:
name: python3-pip
when: ansible_distribution_version >= '20.04'
when: ansible_facts['distribution_version'] >= '20.04'

- name: Python pip package
apt:
name: python-pip
when: ansible_distribution_release < '20.04'
when: ansible_facts['distribution_release'] < '20.04'
2 changes: 1 addition & 1 deletion ansible/roles/fileserver/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ samba_defaults:
hosts_allow: []
interfaces:
- lo
- "{{ ansible_default_ipv4.address }}"
- "{{ ansible_facts['default_ipv4']['address'] }}"
log_level: 1
logon_drive: H
server_min_protocol: ""
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/fileserver/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
- name: Install system packages
apt:
name: "{{ ubuntu_packages }}"
when: ansible_os_family == 'Debian'
when: ansible_facts['os_family'] == 'Debian'

- name: Python pip package
apt:
name: python3-pip
when: ansible_distribution_version >= '20.04'
when: ansible_facts['distribution_version'] >= '20.04'

- name: Python pip package
apt:
name: python-pip
when: ansible_distribution_version < '20.04'
when: ansible_facts['distribution_version'] < '20.04'

- import_tasks: nfs.yml
when: nfs_exports | length > 0
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/fileserver/tasks/virtualbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
apt_repository:
repo: >
deb [arch=amd64 signed-by=/etc/apt/keyrings/oracle_vbox_2016.asc]
{{ virtualbox.apt_repo.url }} {{ ansible_distribution_release }} contrib
{{ virtualbox.apt_repo.url }} {{ ansible_facts['distribution_release }} contrib
filename: virtualbox

- name: Virtualbox package
package:
name: virtualbox
when: ansible_distribution_version < '22.04'
when: ansible_facts['distribution_version'] < '22.04'

- name: Virtualbox package
package:
name: virtualbox-{{ virtualbox.version }}
when: ansible_distribution_version >= '22.04'
when: ansible_facts['distribution_version'] >= '22.04'

- name: Virtualbox systemd unit file
template:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/fileserver/templates/smb.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
logon home = \\%L\%U\.9xprofile
logon path = \\%L\profiles\.msprofile
map to guest = Bad Password
netbios name = {{ ansible_hostname }}
netbios name = {{ ansible_facts['hostname'] }}
security = user
server string = {{ ansible_hostname }}--{{ samba.server_string }}
server string = {{ ansible_facts['hostname'] }}--{{ samba.server_string }}
usershare max shares = 0
workgroup = {{ samba.workgroup }}
{% if samba.hosts_allow|length %}
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/monitoring_agent/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ journald_conf: "{{ journald_conf_defaults | combine(journald_conf_override) }}"
nagios_defaults:
allowed_hosts:
- localhost
nrpe_cfg: "{{ '/etc/nagios' if ansible_os_family == 'Debian' else '/etc'
nrpe_cfg: "{{ '/etc/nagios' if ansible_facts['os_family'] == 'Debian' else '/etc'
}}/nrpe.cfg"
nrpe_path: /etc/{{ 'nagios' if ansible_os_family == 'Debian'
nrpe_path: /etc/{{ 'nagios' if ansible_facts['os_family'] == 'Debian'
else 'nrpe.d' }}/nrpe_local.cfg
nrpe_service: "{{ 'nagios-nrpe-server' if ansible_os_family == 'Debian'
nrpe_service: "{{ 'nagios-nrpe-server' if ansible_facts['os_family'] == 'Debian'
else 'nrpe' }}"
nrpe_user: nagios
local_plugins_path: /usr/local/lib/nagios
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/monitoring_agent/tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: Install extra packages
ansible.builtin.apt:
name: "{{ ubuntu_packages_extra }}"
when: ansible_distribution_version >= '18.04'
when: ansible_facts['distribution_version'] >= '18.04'

- name: Python packages for monitoring
ansible.builtin.command: pip3 install --break-system-packages {{
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/network/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
name: "{{ ubuntu_packages }}"

- import_tasks: network_legacy.yml
when: ansible_distribution_version < '18.04'
when: ansible_facts['distribution_version'] < '18.04'

- import_tasks: netplan.yml
when: ansible_distribution_version >= '18.04'
when: ansible_facts['distribution_version'] >= '18.04'

- import_tasks: kernel.yml
- import_tasks: sshd.yml
2 changes: 1 addition & 1 deletion ansible/roles/ntp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ntp_defaults:
- 1.pool.ntp.org
service:
enabled: yes
name: "{{ 'ntpd-rs' if ansible_os_family == 'Debian' else 'ntpd' }}"
name: "{{ 'ntpd-rs' if ansible_facts['os_family'] == 'Debian' else 'ntpd' }}"
state: restarted

ntp_override: {}
Expand Down
12 changes: 6 additions & 6 deletions ansible/roles/ntp/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: Install system packages
ansible.builtin.apt:
name: "{{ ubuntu_packages }}"
when: ansible_os_family == 'Debian'
when: ansible_facts['os_family'] == 'Debian'

- name: NTP keys
ansible.builtin.template:
Expand All @@ -17,35 +17,35 @@
mode: 0440
src: ntp.keys.j2
notify: Restart ntpd
when: ntp.service.enabled and ansible_distribution_version < '24.04'
when: ntp.service.enabled and ansible_facts['distribution_version'] < '24.04'

- name: NTP config
ansible.builtin.template:
dest: /etc/ntp.conf
src: ntp.conf.j2
notify: Restart ntpd
when: ntp.service.enabled and ansible_distribution_version < '24.04'
when: ntp.service.enabled and ansible_facts['distribution_version'] < '24.04'

- name: Override directory for ntp-rs systemd unit file
ansible.builtin.file:
dest: /etc/systemd/system/ntpd-rs.service.d
state: directory
when: ntp.service.enabled and ansible_distribution_version >= '24.04'
when: ntp.service.enabled and ansible_facts['distribution_version'] >= '24.04'

- name: Allow ntp-rs to bind on port 123
ansible.builtin.copy:
dest: /etc/systemd/system/ntpd-rs.service.d/override.conf
content: |
[Service]
AmbientCapabilities=CAP_SYS_TIME CAP_NET_BIND_SERVICE
when: ntp.service.enabled and ansible_distribution_version >= '24.04'
when: ntp.service.enabled and ansible_facts['distribution_version'] >= '24.04'

- name: ntp-rs config
ansible.builtin.template:
dest: /etc/ntpd-rs/ntp.toml
src: ntp.toml.j2
notify: Restart ntpd
when: ntp.service.enabled and ansible_distribution_version >= '24.04'
when: ntp.service.enabled and ansible_facts['distribution_version'] >= '24.04'

- name: NTP service
ansible.builtin.systemd:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/users/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ opensuse_google_auth_repo:
repo: http://download.opensuse.org/distribution/leap/42.2/repo/oss/suse

pam_package: "{{
'libpam-google-authenticator' if ansible_os_family == 'Debian'
'libpam-google-authenticator' if ansible_facts['os_family'] == 'Debian'
else 'pam-google-authenticator' }}"

ubuntu_repo_uri: http://archive.ubuntu.com/ubuntu/

ubuntu_google_auth_repo:
- deb {{ ubuntu_repo_uri }} {{ ansible_distribution_release }} main restricted universe multiverse
- deb {{ ubuntu_repo_uri }} {{ ansible_facts['distribution_release'] }} main restricted universe multiverse
4 changes: 2 additions & 2 deletions ansible/roles/users/tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
args:
creates: /etc/zypp/repos.d/{{ item.name}}.repo
with_items: "{{ opensuse_google_auth_repo }}"
when: ansible_os_family == 'Suse'
when: ansible_facts['os_family'] == 'Suse'

- name: Ensure repositories available
apt_repository:
repo: "{{ item }}"
filename: ubuntu
with_items: "{{ ubuntu_google_auth_repo }}"
when: ansible_os_family == 'Debian'
when: ansible_facts['os_family'] == 'Debian'

- name: Install PAM module for google-authenticator
package:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/volumes/tasks/encrypted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
shell: >
cryptsetup isLuks /dev/{{ item.value.vg }}/{{ item.key }} ||
cryptsetup luksFormat --batch-mode --verbose --key-file={{
masterkey.path }}/keys/{{ ansible_hostname }}/{{
masterkey.path }}/keys/{{ ansible_facts['hostname'] }}/{{
item.key }} /dev/{{ item.value.vg }}/{{ item.key }}
register: luks_format
changed_when: ("Command successful" in luks_format.stdout)
Expand All @@ -57,7 +57,7 @@
- name: Crypt table entries
lineinfile:
line: "{{ 'luks-%-16s /dev/mapper/%s-%-16s %s/keys/%s/%-12s luks' % (
item.key, item.value.vg, item.key, masterkey.path, ansible_hostname,
item.key, item.value.vg, item.key, masterkey.path, ansible_facts['hostname'],
item.key) }}"
path: /etc/crypttab.setup
regexp: "^luks-{{ item.key }}.*"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/volumes/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- name: Install system packages
ansible.builtin.apt:
name: "{{ ubuntu_packages }}"
when: ansible_os_family == 'Debian'
when: ansible_facts['os_family'] == 'Debian'

- name: Create mount points
ansible.builtin.file:
Expand Down
4 changes: 2 additions & 2 deletions images/weewx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ARG AIRLINK_SHA=6392ee1d8e96a543306f16430ec9095b79dd7d0aacf8078171aa61b060a49745

COPY install-input.txt entrypoint.sh log.conf /tmp
RUN apk add --no-cache --update \
curl freetype libjpeg libstdc++ openssh openssl python3 py3-cheetah \
curl freetype libjpeg libstdc++ openssh openssl python3 \
py3-configobj py3-mysqlclient py3-pillow py3-pymysql py3-pyserial \
py3-requests py3-six py3-usb rsync rsyslog tzdata && \
adduser -u $WX_UID -s /bin/sh -G $WX_GROUP -D $WX_USER && \
Expand All @@ -64,7 +64,7 @@ RUN apk add --no-cache --update \
VENV=/home/$WX_USER/weewx-venv && \
python3 -m venv $VENV --system-site-packages && \
source $VENV/bin/activate && \
python3 -m pip install weewx==$WEEWX_VERSION && \
python3 -m pip install weewx==$WEEWX_VERSION ct3 && \
git clone -b $WEEGREEN_VERSION --depth 1 \
https://github.com/instantlinux/weewx-WeeGreen.git \
$WX_ROOT/skins/WeeGreen && \
Expand Down
Loading