title: creating multiple user with parameterised in pupet module
body: <p>I am new to puppet world . I have to create a module to create a multiple users ,parameterized .</p>
  
  <p>I have created a module as below . Not sure if that proper .</p>
  
  <pre><code>class users () {
      group { "sysadmin":
          ensure =&gt; present,
      }
  
      define users::add ($username, $groupname= "" ,$shell= "",$ensure, $login= false) {
          user { "$username":
              ensure =&gt; "$ensure" ,
              groups =&gt; "$groupname"  ,
              shell =&gt;  "$shell" ,
              require =&gt; Group["sysadmin"]  ,
          }
      }
  }
  </code></pre>
  
  <p>I have to create multiple user with above code . how and where to create that . Can I call in the same file ?(init.pp)</p>
  
  <p>I tried by appending below line in the same file </p>
  
  <pre><code>class users::add {
      users::add { "user1": username =&gt; "myuser1"  , groupname =&gt; "sysadmin" , shell =&gt; "/bin/bash"  , ensure =&gt; present  , login =&gt; true }
      users::add { "user2": username =&gt; "myuser2"  , groupname =&gt; "sysadmin" , shell =&gt; "/bin/bash"  , ensure =&gt; present  , login =&gt; true }
  }
  </code></pre>
  
  <p>it is not working .</p>
  
  <p>Any help is highly appreciable . Thanks in advance .</p>