summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authortphoney <tp@puppetlabs.com>2015-07-09 15:13:00 +0100
committertphoney <tp@puppetlabs.com>2015-07-15 14:06:34 +0100
commit14709d625b840da1919b5cd8933b73fb771e547b (patch)
tree5b7c77e9913a0447c3ad648afcb386cc54a7222e /examples
parenta0224412893d39463a4fde82887312b279f83e1b (diff)
prep work for 4.7.0
add new improvements puppet4 changes for testing
Diffstat (limited to 'examples')
-rw-r--r--examples/file_line.pp9
-rw-r--r--examples/has_interface_with.pp10
-rw-r--r--examples/has_ip_address.pp3
-rw-r--r--examples/has_ip_network.pp4
-rw-r--r--examples/init.pp1
5 files changed, 27 insertions, 0 deletions
diff --git a/examples/file_line.pp b/examples/file_line.pp
new file mode 100644
index 0000000..eea693e
--- /dev/null
+++ b/examples/file_line.pp
@@ -0,0 +1,9 @@
+# This is a simple smoke test
+# of the file_line resource type.
+file { '/tmp/dansfile':
+ ensure => present
+}->
+file_line { 'dans_line':
+ line => 'dan is awesome',
+ path => '/tmp/dansfile',
+}
diff --git a/examples/has_interface_with.pp b/examples/has_interface_with.pp
new file mode 100644
index 0000000..e1f1353
--- /dev/null
+++ b/examples/has_interface_with.pp
@@ -0,0 +1,10 @@
+include stdlib
+info('has_interface_with(\'lo\'):', has_interface_with('lo'))
+info('has_interface_with(\'loX\'):', has_interface_with('loX'))
+info('has_interface_with(\'ipaddress\', \'127.0.0.1\'):', has_interface_with('ipaddress', '127.0.0.1'))
+info('has_interface_with(\'ipaddress\', \'127.0.0.100\'):', has_interface_with('ipaddress', '127.0.0.100'))
+info('has_interface_with(\'network\', \'127.0.0.0\'):', has_interface_with('network', '127.0.0.0'))
+info('has_interface_with(\'network\', \'128.0.0.0\'):', has_interface_with('network', '128.0.0.0'))
+info('has_interface_with(\'netmask\', \'255.0.0.0\'):', has_interface_with('netmask', '255.0.0.0'))
+info('has_interface_with(\'netmask\', \'256.0.0.0\'):', has_interface_with('netmask', '256.0.0.0'))
+
diff --git a/examples/has_ip_address.pp b/examples/has_ip_address.pp
new file mode 100644
index 0000000..8429a88
--- /dev/null
+++ b/examples/has_ip_address.pp
@@ -0,0 +1,3 @@
+include stdlib
+info('has_ip_address(\'192.168.1.256\'):', has_ip_address('192.168.1.256'))
+info('has_ip_address(\'127.0.0.1\'):', has_ip_address('127.0.0.1'))
diff --git a/examples/has_ip_network.pp b/examples/has_ip_network.pp
new file mode 100644
index 0000000..a15d8c0
--- /dev/null
+++ b/examples/has_ip_network.pp
@@ -0,0 +1,4 @@
+include stdlib
+info('has_ip_network(\'127.0.0.0\'):', has_ip_network('127.0.0.0'))
+info('has_ip_network(\'128.0.0.0\'):', has_ip_network('128.0.0.0'))
+
diff --git a/examples/init.pp b/examples/init.pp
new file mode 100644
index 0000000..9675d83
--- /dev/null
+++ b/examples/init.pp
@@ -0,0 +1 @@
+include stdlib