Skip to content

nginx Role Error on Remove all configuration symlinks during config reset #184

@pfauenauge

Description

@pfauenauge

When running der nginx Role I receive an Error in section "Remove all configuration symlinks during config reset"

with Error Message:

fatal: [.....]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "_raw_params": "rm -f /etc/nginx/sites-enabled/*",
            "_uses_shell": true,
            "argv": null,
            "chdir": null,
            "creates": "/etc/ansible/facts.d/nginx.fact",
            "executable": "sh",
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true,
            "warn": false
        }
    },
    "msg": "Unsupported parameters for (ansible.legacy.command) module: warn. Supported parameters include: creates, executable, chdir, strip_empty_ends, _uses_shell, argv, stdin, _raw_params, stdin_add_newline, removes."
}

I use the versions:

ansible --version
ansible [core 2.14.1]
  config file = None
  configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = ~/.local/lib/python3.9/site-packages/ansible
  ansible collection location = ~/.ansible/collections:/usr/share/ansible/collections
  executable location = ~/.local/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

debops --version
debops 3.0.3

File causing the error:
debops/roles01/roles/nginx/tasks/main.yml
line 202..

  # If nginx local facts are not present, assume that configuration
  # is being reset and move all symlinks out of the way to prevent
  # accidental failures because of old wrong configuration files
- name: Remove all configuration symlinks during config reset
  shell: rm -f /etc/nginx/sites-enabled/*
  args:
    executable: '/bin/sh'
    creates: '/etc/ansible/facts.d/nginx.fact'
    warn: False
  when: (nginx__deploy_state in [ 'present' ])

When I remove the "warn: False" it works.

Is it save to just remove it and create a pull request or would the changes go to a different direction? I'm rather new to ansible & debops.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions