Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pfauenauge opened this issue Jan 15, 2023 · 0 comments

Comments

@pfauenauge
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant