Skip to content

interface_name required #31

Description

@mvogt1

The following code:


networkmanager::ifc::connection {
     'ens192':
        ensure                  => present,
        ipv4_method             => 'auto',
        ipv4_address            => $external_ip,
        ipv6_method             => 'disabled',
  }

throws this error:

For ethernet connection ens192 either interface_name or mac_address is required

The attached patch would fix this. It replace interfacename with a new default, as in the other implementations:

diff --git a/manifests/ifc/connection.pp b/manifests/ifc/connection.pp
index a101750..393dac0 100644
--- a/manifests/ifc/connection.pp
+++ b/manifests/ifc/connection.pp
@@ -30,7 +30,7 @@ define networkmanager::ifc::connection(
   Enum['absent', 'present']                                          $ensure = present,
   Enum['up', 'down']                                                 $state = 'up',
   String                                                             $id = $title,
-  Optional[String[3, 15]]                                            $interface_name = undef,
+  Optional[String[3, 15]]                                            $interface_name = $title,
   Optional[Stdlib::MAC]                                              $mac_address = undef,
   Optional[String]                                                   $master = undef,
   String                                                             $type = 'ethernet',


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions