summaryrefslogtreecommitdiff
path: root/lib/chef/resource/ifconfig.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/ifconfig.rb')
-rw-r--r--lib/chef/resource/ifconfig.rb68
1 files changed, 34 insertions, 34 deletions
diff --git a/lib/chef/resource/ifconfig.rb b/lib/chef/resource/ifconfig.rb
index 2c5262fa97..85c0af5c02 100644
--- a/lib/chef/resource/ifconfig.rb
+++ b/lib/chef/resource/ifconfig.rb
@@ -28,51 +28,51 @@ class Chef
description "Use the **ifconfig** resource to manage interfaces on Unix and Linux systems. Note: This resource requires the ifconfig binary to be present on the system and may require additional packages to be installed first. On Ubuntu 18.04 or later you will need to install the `ifupdown` package, which disables the built in Netplan functionality. Warning: This resource will not work with Fedora release 33 or later."
examples <<~DOC
- **Configure a network interface with a static IP**
+ **Configure a network interface with a static IP**
- ```ruby
- ifconfig '33.33.33.80' do
- device 'eth1'
- end
- ```
+ ```ruby
+ ifconfig '33.33.33.80' do
+ device 'eth1'
+ end
+ ```
- will create the following interface configuration:
+ will create the following interface configuration:
- ```
- iface eth1 inet static
- address 33.33.33.80
- ```
+ ```
+ iface eth1 inet static
+ address 33.33.33.80
+ ```
- **Configure an interface to use DHCP**
+ **Configure an interface to use DHCP**
- ```ruby
- ifconfig 'Set eth1 to DHCP' do
- device 'eth1'
- bootproto 'dhcp'
- end
- ```
+ ```ruby
+ ifconfig 'Set eth1 to DHCP' do
+ device 'eth1'
+ bootproto 'dhcp'
+ end
+ ```
- will create the following interface configuration:
+ will create the following interface configuration:
- ```
- iface eth1 inet dhcp
- ```
+ ```
+ iface eth1 inet dhcp
+ ```
- **Update a static IP address with a boot protocol**
+ **Update a static IP address with a boot protocol**
- ```ruby
- ifconfig "33.33.33.80" do
- bootproto "dhcp"
- device "eth1"
- end
- ```
+ ```ruby
+ ifconfig "33.33.33.80" do
+ bootproto "dhcp"
+ device "eth1"
+ end
+ ```
- will update the interface configuration from static to dhcp:
+ will update the interface configuration from static to dhcp:
- ```
- iface eth1 inet dhcp
- address 33.33.33.80
- ```
+ ```
+ iface eth1 inet dhcp
+ address 33.33.33.80
+ ```
DOC
state_attrs :inet_addr, :mask