Skip to content

Commit 5d4054e

Browse files
committed
Remove validate command. Not needed.
1 parent 4dc42d2 commit 5d4054e

4 files changed

Lines changed: 10 additions & 26 deletions

File tree

manifests/fact.pp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@
1414
$facter_data = { "${title}" => $value }
1515

1616
file { "${facterbasepath}/facts.d/${title}.yaml":
17-
ensure => $ensure,
18-
owner => 'root',
19-
group => $::puppet::defaults::puppet_group,
20-
mode => '0640',
21-
validate_cmd => "/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\"",
22-
content => template('puppet/fact.yaml.erb'),
17+
ensure => $ensure,
18+
owner => 'root',
19+
group => $::puppet::defaults::puppet_group,
20+
mode => '0640',
21+
content => template('puppet/fact.yaml.erb'),
2322
}
2423

2524
}

manifests/facts.pp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616
}
1717

1818
file { "${facterbasepath}/facts.d/local.yaml":
19-
ensure => file,
20-
owner => 'root',
21-
group => $::puppet::defaults::puppet_group,
22-
mode => '0640',
23-
validate_cmd => "/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\"",
24-
content => template('puppet/local_facts.yaml.erb'),
19+
ensure => file,
20+
owner => 'root',
21+
group => $::puppet::defaults::puppet_group,
22+
mode => '0640',
23+
content => template('puppet/local_facts.yaml.erb'),
2524
}
2625

2726
}

spec/classes/puppet_facts_spec.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@
102102
/FQDN my.fq.hostname/
103103
).with_content(
104104
/---/
105-
).with_validate_cmd(
106-
"/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\""
107105
)
108106
should contain_file("#{facterbasepath}/facts.d/local.yaml").with_content(
109107
/Environment production/
@@ -129,8 +127,6 @@
129127
/key1: val1/
130128
).with_content(
131129
/key2: val2/
132-
).with_validate_cmd(
133-
"/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\""
134130
)
135131
should contain_file("#{facterbasepath}/facts.d/local.yaml").with_content(
136132
/Environment production/
@@ -164,8 +160,6 @@
164160
/- val21/
165161
).with_content(
166162
/- val22/
167-
).with_validate_cmd(
168-
"/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\""
169163
)
170164
should contain_file("#{facterbasepath}/facts.d/local.yaml").with_content(
171165
/Environment production/
@@ -195,8 +189,6 @@
195189
/key2:/
196190
).with_content(
197191
/key21: val21/
198-
).with_validate_cmd(
199-
"/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\""
200192
)
201193
should contain_file("#{facterbasepath}/facts.d/local.yaml").with_content(
202194
/Environment production/

spec/defines/fact_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@
6666
/---/
6767
).with_content(
6868
/my_fact: my_val/
69-
).with_validate_cmd(
70-
"/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\""
7169
)
7270
end
7371
end
@@ -91,8 +89,6 @@
9189
/- my_val0/
9290
).with_content(
9391
/- my_val1/
94-
).with_validate_cmd(
95-
"/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\""
9692
)
9793
end
9894
end
@@ -116,8 +112,6 @@
116112
/my_key0: my_val0/
117113
).with_content(
118114
/my_key1: my_val1/
119-
).with_validate_cmd(
120-
"/usr/bin/env ruby -ryaml -e \"YAML.load_file '%'\""
121115
)
122116
end
123117
end

0 commit comments

Comments
 (0)