Skip to content

Cannot install nginx with Debian 13 #923

@Triqueon

Description

@Triqueon

Bug Overview

Trying to use this role to install nginx on Debian 13 runs into an error as the role still tries to use apt-key to add the NGINX signing key. As far as I can tell, this has been deprecated for at the very least 5 years, possibly 15, and Debian 13 ships without the apt-key binary entirely.

This https://peateasea.de/avoiding-ansible-apt-key-on-debian/ has some advice on how to handle key addition without the ansible built-in apt_key module.

Expected Behavior

The role should work on Debian >= 13 and install nginx

Steps to Reproduce the Bug

  1. I have deployed/run the NGINX Ansible role using the following playbook.yml:
---
- hosts: servers
  become: yes
  roles:
    - nginxinc.nginx
  1. I have seen the following error(s) on my terminal/logs:
    FAILED! => {"changed": false, "msg": "Failed to find required executable "apt-key" in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}

Environment Details

  • Target deployment platforms:Hetzner VM
  • Target OSs: Debian 13
  • Host OS (where you are running Ansible from): Ubuntu 24.04
  • Version of the NGINX Ansible role (or specific commit): 0.25.0
  • Version of Ansible: 2.16.3
  • How is Ansible being managed: command line

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions