Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8581677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:06:38+00:00 2026-06-11T21:06:38+00:00

I am writing a Puppet provider and I need a boolean property. I declared

  • 0

I am writing a Puppet provider and I need a boolean property. I declared it with:

newproperty(:no_sync, :boolean => true) do
  desc "Whether to omit syncing the file after every logging, ony when action_type is file."
end

Then I need to declare the no_sync function in the provider which should return true or false. However, when I do this, it seems the values returned as not properly interpreted by Puppet. I’ve tried returning strings (:true and :false respectively), but as a result they always get interpreted as true (which is quite logical).

How are we supposed to declare boolean properties in a Puppet provider?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:06:39+00:00Added an answer on June 11, 2026 at 9:06 pm

    Returning the symbols :true and :false from the provider method is the correct thing to do.

    You could take a look at the macauthorization source code for an example of how the type is defined. The provider for this type returns :true or :false.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Writing a program in which I need to split strings from a struct linked
Writing to a file is not working after hosting the web application, whereas they
Writing a templated function, I declared: template <typename T> T invertible(T const& container, T::size_type
Writing a file utility to strip out all non-ASCII characters from files. I have
Writing a rather simple command line tool in ruby I need to report meaningful
writing to a text file is working good...But my problem is text file is
Writing some test scripts in IronPython, I want to verify whether a window is
Writing a program for a project. I need to use a ListSelectionListener in order
Writing my first silverlight application. I need to deliver some bitmap that the customer
Writing a script that cds into another dir, loads the correct rvm rvmrc file,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.