Git Product home page Git Product logo

Comments (4)

alessfg avatar alessfg commented on August 18, 2024 1

Alright, I'll look into this once I fix some permission issues introduced in Ansible 2.9.12

from ansible-role-nginx-config.

alessfg avatar alessfg commented on August 18, 2024

Hey @Migsi! Tests for this parameter are passing just fine. Can you have a look at the test playbook and see if there's anything that you might be missing? https://github.com/nginxinc/ansible-role-nginx-config/blob/main/molecule/common/playbooks/module_converge.yml#L11-L17

from ansible-role-nginx-config.

dudefellah avatar dudefellah commented on August 18, 2024

I might be seeing the same issue on the 0.1.0 release of this role. I don't see any changes since that release that looks like they would affect this behaviour, so I'm guessing it's still a problem.

The problem is that this happens when I'm not explicitly setting nginx_config_cleanup_files in my play:

TASK [nginxinc.nginx_config : (Setup: All OSs) Remove NGINX Configuration Files] ***********************************************************************************************************************************
fatal: [prod.hla.triumf.ca]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ nginx_config_files.results | default('') | map(attribute='files') | sum(start=[]) | map(attribute='path') | list + nginx_config_cleanup_files | default('') }}): can only concatenate list (not \"str\") to list"}

It looks like nginx_config_cleanup_files is assumed to be a str instead of a list, which messed up the list addition. This value also happens to be commented out in defaults/main/main.yml, so defaulting it to an empty list for the role should probably solve it.

from ansible-role-nginx-config.

Migsi avatar Migsi commented on August 18, 2024

I might be seeing the same issue on the 0.1.0 release of this role. I don't see any changes since that release that looks like they would affect this behaviour, so I'm guessing it's still a problem.

The problem is that this happens when I'm not explicitly setting nginx_config_cleanup_files in my play:

TASK [nginxinc.nginx_config : (Setup: All OSs) Remove NGINX Configuration Files] ***********************************************************************************************************************************
fatal: [prod.hla.triumf.ca]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ nginx_config_files.results | default('') | map(attribute='files') | sum(start=[]) | map(attribute='path') | list + nginx_config_cleanup_files | default('') }}): can only concatenate list (not \"str\") to list"}

It looks like nginx_config_cleanup_files is assumed to be a str instead of a list, which messed up the list addition. This value also happens to be commented out in defaults/main/main.yml, so defaulting it to an empty list for the role should probably solve it.

This seems to nail it. Anyways, I still have to migrate my existing config to the new naming schema that was introduced by the split. That was causing the issue at my side, since nginx_config_cleanup_files was never part of my config.

from ansible-role-nginx-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.