summaryrefslogtreecommitdiff
path: root/lib/chef/resource/windows_printer.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-30 16:56:50 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-30 16:56:50 -0700
commit4ba62b9a41014cbbd9e5c6de32115eca796cb5c6 (patch)
tree72fc94bd715b5b62fd915a56db6d99d79a471772 /lib/chef/resource/windows_printer.rb
parent18ca8ca2ec2e09ac5d2ca4b37d8db37ee767c34d (diff)
downloadchef-4ba62b9a41014cbbd9e5c6de32115eca796cb5c6.tar.gz
Add more examples to resources
Backfilling the world! Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/windows_printer.rb')
-rw-r--r--lib/chef/resource/windows_printer.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/chef/resource/windows_printer.rb b/lib/chef/resource/windows_printer.rb
index 868598374d..3608cae5be 100644
--- a/lib/chef/resource/windows_printer.rb
+++ b/lib/chef/resource/windows_printer.rb
@@ -28,6 +28,26 @@ class Chef
description "Use the **windows_printer** resource to setup Windows printers. Note that this doesn't currently install a printer driver. You must already have the driver installed on the system."
introduced "14.0"
+ examples <<~DOC
+ **Create a printer**:
+
+ ```ruby
+ windows_printer 'HP LaserJet 5th Floor' do
+ driver_name 'HP LaserJet 4100 Series PCL6'
+ ipv4_address '10.4.64.38'
+ end
+ ```
+
+ **Delete a printer**:
+
+ Note: this doesn’t delete the associated printer port. See windows_printer_port above for how to delete the port.
+
+ ```ruby
+ windows_printer 'HP LaserJet 5th Floor' do
+ action :delete
+ end
+ ```
+ DOC
property :device_id, String,
description: "An optional property to set the printer queue name if it differs from the resource block's name. Example: `HP LJ 5200 in fifth floor copy room`.",