code: def agent(state, host, server=None, port=None):
      
  
      args = []
  
      if server:
          args.append('--server=%s' % server)
      if port:
          args.append('--masterport=%s' % port)
  
      yield 'puppet agent -t %s' % ' '.join(args)
docs: Run puppet agent
  
      + server: master server URL
      + port: puppet master port