- should create_file("sources.list.d").with({
- "path" => "/etc/apt/sources.list.d",
- "ensure" => "directory",
- "owner" => "root",
- "group" => "root"
- })
+ if param_hash[:purge_sources_list_d]
+ should create_file("sources.list.d").with({
+ 'path' => "/etc/apt/sources.list.d",
+ 'ensure' => "directory",
+ 'owner' => "root",
+ 'group' => "root",
+ 'purge' => true,
+ 'recurse' => true,
+ 'notify' => 'Exec[apt_update]'
+ })
+ else
+ should create_file("sources.list.d").with({
+ 'path' => "/etc/apt/sources.list.d",
+ 'ensure' => "directory",
+ 'owner' => "root",
+ 'group' => "root",
+ 'purge' => false,
+ 'recurse' => false,
+ 'notify' => 'Exec[apt_update]'
+ })
+ end