- else
- should_not contain_exec("make-apt-insecure").with({
- 'command' => '/bin/echo "APT::Get::AllowUnauthenticated 1;" >> /etc/apt/apt.conf.d/99unauth',
- 'creates' => '/etc/apt/apt.conf.d/99unauth'
+ elsif param_hash[:disable_keys] == false
+ should create_file("99unauth").with({
+ 'ensure' => "absent",
+ 'path' => "/etc/apt/apt.conf.d/99unauth"
+ })
+ elsif param_hash[:disable_keys] != :undef
+ should_not create_file("99unauth").with({
+ 'path' => "/etc/apt/apt.conf.d/99unauth"