1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-21 20:59:10 +00:00

CI: Replace apt_repository and apt_key with deb822_repository (#11625)

Replace apt_repository and apt_key with deb822_repository.
This commit is contained in:
Felix Fontein 2026-03-19 23:12:40 +01:00 committed by GitHub
parent dae2157bb7
commit bc22fbcaa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 64 additions and 36 deletions

View file

@ -10,19 +10,10 @@
become: true become: true
when: ansible_facts.distribution == 'Fedora' when: ansible_facts.distribution == 'Fedora'
- block: - name: Install flatpak package on Ubuntu
- name: Activate flatpak ppa on Ubuntu
apt_repository:
repo: ppa:alexlarsson/flatpak
state: present
mode: '0644'
when: ansible_facts.lsb.major_release | int < 18
- name: Install flatpak package on Ubuntu
apt: apt:
name: flatpak name: flatpak
state: present state: present
when: ansible_facts.distribution == 'Ubuntu' when: ansible_facts.distribution == 'Ubuntu'
- name: Install dummy remote for user - name: Install dummy remote for user

View file

@ -8,14 +8,7 @@
name: flatpak name: flatpak
state: present state: present
when: ansible_facts.distribution == 'Fedora' when: ansible_facts.distribution == 'Fedora'
- block: - name: Install flatpak package on Ubuntu
- name: Activate flatpak ppa on Ubuntu versions older than 18.04/bionic
apt_repository:
repo: ppa:alexlarsson/flatpak
state: present
mode: '0644'
when: ansible_facts.lsb.major_release | int < 18
- name: Install flatpak package on Ubuntu
apt: apt:
name: flatpak name: flatpak
state: present state: present

View file

@ -45,16 +45,37 @@
ansible.builtin.get_url: ansible.builtin.get_url:
url: https://packages.gopass.pw/repos/gopass/gopass-archive-keyring.gpg url: https://packages.gopass.pw/repos/gopass/gopass-archive-keyring.gpg
dest: /usr/share/keyrings/gopass-archive-keyring.gpg dest: /usr/share/keyrings/gopass-archive-keyring.gpg
- name: Add gopass repo - name: Make sure python3-debian is installed
ansible.builtin.apt_repository: ansible.builtin.apt:
repo: "deb [arch=amd64,arm64,armhf \ name: python3-debian
signed-by=/usr/share/keyrings/gopass-archive-keyring.gpg] \
https://packages.gopass.pw/repos/gopass stable main"
state: present state: present
- name: Update apt-cache and install gopass package - name: Add gopass repo
ansible.builtin.deb822_repository:
name: gopass
types: deb
architectures:
- amd64
- arm64
- armhf
signed_by: /usr/share/keyrings/gopass-archive-keyring.gpg
uris:
- https://packages.gopass.pw/repos/gopass
suites:
- stable
components:
- main
state: present
register: apt_repo
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
when: apt_repo is changed
- name: Install gopass package
ansible.builtin.apt: ansible.builtin.apt:
name: gopass name: gopass
update_cache: true state: present
- name: Install on macOS - name: Install on macOS
when: ansible_facts.distribution == 'MacOSX' when: ansible_facts.distribution == 'MacOSX'

View file

@ -16,14 +16,37 @@
- ndg-httpsclient - ndg-httpsclient
- pyasn1 - pyasn1
- name: Add InfluxDB public GPG key - name: Make sure python3-debian is installed
apt_key: url=https://repos.influxdata.com/influxdb.key state=present ansible.builtin.apt:
name: python3-debian
state: present
- name: Add InfluxDB repository - name: Add InfluxDB repository
apt_repository: repo='deb https://repos.influxdata.com/ubuntu trusty stable' filename='influxdb' state=present update_cache=yes ansible.builtin.deb822_repository:
update_cache: true
name: influxdb
types: deb
signed_by: https://repos.influxdata.com/influxdb.key
uris:
- https://repos.influxdata.com/ubuntu
suites:
- trusty
components:
- stable
state: present
register: apt_repo
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
when: apt_repo is changed
- name: Install InfluxDB - name: Install InfluxDB
apt: name=influxdb state=latest ansible.builtin.apt:
name: influxdb
state: latest
- name: Start InfluxDB service - name: Start InfluxDB service
service: name=influxdb state=started ansible.builtin.service:
name: influxdb
state: started