Note that if the password is supplied as illustrated in your example, it will be stored in the Puppet catalog in plain text, making it visible to anyone with permission to read it.  (Which includes "everyone" if you use PuppetDB.)