tuxinvader.launchpad.source_package (1.0.7) — module

Manage source_packages in a PPA

| "added in version" 1.0.2 of tuxinvader.launchpad"

Authors: Mark Boddington (@TuxInvader)

Install collection

Install with ansible-galaxy collection install tuxinvader.launchpad:==1.0.7


Add to requirements.yml

  collections:
    - name: tuxinvader.launchpad
      version: 1.0.7

Description

Manage source packages in a PPA

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Delete the kernel 5.19.11 packages from ~tuxinvader/jammy-mainline
-   name: Delete the kernel 5.19.11 packages from ~tuxinvader/jammy-mainline
    source_package:
        project: ~tuxinvader
        ppa: jammy-mainline
        name: kernel-generic-5.19
        version: 5.19.11
        ensure: absent
    environment:
        LP_ACCESS_TOKEN: kjaslkdjalksd
        LP_ACCESS_SECRET: alskjajsdlk
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Ensure the package 5.15.70 is published, upload if missing
-   name: Ensure kernel 5.19.12 is added
    source_package:
        project: ~tuxinvader
        ppa: my-random-ppa
        name: linux-5.19.12
        version: 5.19.12-051912.202209281927
        ensure: present
        source_changes: /usr/local/src/cod/debs/v5.19.12/linux-5.19.12_5.19.12-051912.202209281927_source.changes

Inputs

    
ppa:
    description: The name of the PPA
    required: true
    type: str

name:
    description: The name of the Source Package
    required: true
    type: str

match:
    default: exact
    description: Use when ensure==absent to select files for deletion, ignored when ensure==present
      Can be either exact, starts_with, ends_with, contains, or regex
    required: false
    type: str

ensure:
    default: present
    description: Ensure the PPA is present or absent
    required: false
    type: str

project:
    description: The name of the project owning the PPA
    required: true
    type: str

version:
    default: None
    description: The version of source package, the default is None (all versions)
    required: false
    type: str

source_changes:
    description: The source file to upload to the PPA. If ensure is present and the package
      is missing we will send the changes file to the PPA for building, if source_changes
      is unset we fail.
    required: false
    type: str

Outputs

dput:
  description: Information about any uploads which may have taken place (if source_changes
    was set and package was missing)
  returned: always
  sample:
    count: 4
    uploads:
    - linux-5.19.12_5.19.12-051912.202209281927_source.changes
    - linux-5.19.12_5.19.12-051912.202209281927.dsc
    - linux-5.19.12_5.19.12-051912.202209281927.tar.gz
    - linux-5.19.12_5.19.12-051912.202209281927_source.buildinfo
  type: dict
messages:
  description: Information about each package that was processed
  returned: always
  sample:
  - 'package unchanged, version mismatch: ''5.19.12'' not ''6.0-rc7'', regex: ''^linux-generic.*'',
    result: ''linux-generic-5.19'''
  type: list
sources:
  description: Information about all effected packages
  returned: always
  sample:
  - component_name: main
    date_created: '2022-09-27T20:28:09.672351+00:00'
    date_made_pending: null
    date_published: '2022-09-27T21:21:45.001015+00:00'
    date_removed: null
    date_superseded: null
    display_name: linux-generic-5.19 5.19.11 in focal
    http_etag: '"dbbf1a487b52f75b2609734117fa4c4fb202240f-d03b23f6284e5b10e67438443fe111b7f5e65ab3"'
    pocket: Release
    removal_comment: null
    resource_type_link: https://api.launchpad.net/devel/#source_package_publishing_history
    scheduled_deletion_date: null
    section_name: devel
    self_link: https://api.launchpad.net/devel/~tuxinvader/+archive/ubuntu/my-random-ppa/+sourcepub/13973912
    source_package_name: linux-generic-5.19
    source_package_version: 5.19.11
    status: Published
  type: list