Code Monkey home page Code Monkey logo

Comments (5)

matonb avatar matonb commented on September 17, 2024

How about something along these lines:

define squid::acl (
  Boolean $allow_first = true,
  String $type,
  String $aclname = $title,
  Array  $entries = [],
  String $order   = '05',
  String $comment = "acl fragment for ${aclname}",
) {

  $priority = ($allow_first and $type=='allow') ? {
    true      => '000',
    default => '200',
  }
  concat::fragment{"squid_acl_${aclname}":
    target  => $::squid::config,
    content => template('squid/squid.conf.acl.erb'),
    order   => "10-${priority}-${order}-${type}",
  }

}

Although allow_first should probably be defined in init.pp / params.pp or you could make a right mess by changing it each time squid::acl was called

from puppet-squid.

ekohl avatar ekohl commented on September 17, 2024

Something like this makes sense. I know it's been a while but would you be interested in writing up a PR for this?

from puppet-squid.

matonb avatar matonb commented on September 17, 2024

I could, just not sure when I'll get to it though.
@warrenpnz happy to step back if you want to pick this up

from puppet-squid.

traylenator avatar traylenator commented on September 17, 2024

So currently the order => "10-${order}-${type_cleaned}"

So allows allways come before denys? Is that not the case? That was the intentions for sure.

Steve.

from puppet-squid.

hdep avatar hdep commented on September 17, 2024

Hi,

I have the same issue.
I need to set http_access deny to_localhost before allow.

Any news on this?

from puppet-squid.

Related Issues (13)

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.