Skip to content

Rethink $code_manager_auto_configure #351

@bastelfreak

Description

@bastelfreak

Describe the Bug

Good morning. Maybe this is a bug, maybe a feature request, I'm not sure.

In peadm::subplans::install and in peadm::install we have the following parameter signature:

Optional[Boolean] $code_manager_auto_configure = true,

The value has a default parameter that's not undef. The datatype is undef. We cannot pass undef to it. When we call the plan and don't set the parameter, or if we pass undef, the default from the plan, true, is used. A fix would be to remove the Optional and make it a boolean:

Boolean $code_manager_auto_configure = true,

But does that make sense? $r10k_remote, $r10k_private_key_file and $r10k_private_key_content are optional. So by default we enable code manager but don't configure any repository. This will lock r10k, we're not able to call r10k directly anymore. But that might be desired for bootstrapping. We're now forced to add a repo via the PE console or disable the code manager.

Expected Behavior

I think the default value for $code_manager_auto_configure should be undef. People can explicitly enable or disable it. If $r10k_remote and $r10k_private_key_file or $r10k_private_key_content are set and $code_manager_auto_configure isn't false, we should enable code manager.

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