puppetlabs/puppet · error · ArgumentError
Profile names must be provided, not numbers
Error message
Profile names must be provided, not numbers
What it means
Raised by the validate block of the `profiles` property (Puppet::Property::OrderedList with :required_features => :manages_solaris_rbac) on the `user` type. Solaris RBAC profiles are named execution profiles; a member matching /^\d+$/ is rejected as an illegal numeric identifier. Because the parent is OrderedList, order matters for profiles and is preserved.
Source
Thrown at lib/puppet/type/user.rb:592
(`inclusive`) or the **minimum list** (`minimum`) of auths the user
has. This setting is specific to managing Solaris authorizations."
newvalues(:inclusive, :minimum)
defaultto :minimum
end
newproperty(:profiles, :parent => Puppet::Property::OrderedList, :required_features => :manages_solaris_rbac) do
desc "The profiles the user has. Multiple profiles should be
specified as an array."
def membership
:profile_membership
end
validate do |value|
if value =~ /^\d+$/
raise ArgumentError, _("Profile names must be provided, not numbers")
end
raise ArgumentError, _("Profile names must be provided as an array, not a comma-separated list") if value.include?(",")
end
end
newparam(:profile_membership) do
desc "Whether specified roles should be treated as the **complete list**
(`inclusive`) or the **minimum list** (`minimum`) of roles
of which the user is a member."
newvalues(:inclusive, :minimum)
defaultto :minimum
end
newproperty(:keys, :parent => Puppet::Property::KeyValue, :required_features => :manages_solaris_rbac) do
desc "Specify user attributes in an array of key = value pairs."
View on GitHub (pinned to e227c27540)
Solutions
- Pass profile names: `profiles => ['System Administrator']`
- Verify exact profile names with `profiles -l` on the target (they are case-sensitive)
- Remove numeric entries from the source data
Example fix
# before
user { 'alice':
ensure => present,
profiles => ['7'],
}
# after
user { 'alice':
ensure => present,
profiles => ['System Administrator', 'Basic Solaris User'],
} Defensive patterns
Strategy: validation
Validate before calling
bad = profiles.select { |p| p.to_s.match?(/\A\d+\z/) }
raise ArgumentError, "profiles must be names: #{bad.inspect}" unless bad.empty? Type guard
def profile_names?(list)
list.is_a?(Array) && list.all? { |p| p.is_a?(String) && !p.match?(/\A\d+\z/) && !p.include?(',') }
end Prevention
- Check exact profile names with `profiles -l`; they are case-sensitive
- Keep profile order intentional — profiles is an OrderedList
- Reject numeric profile data at the CMDB boundary
When it happens
Trigger: `user { 'alice': profiles => ['7'] }` on Solaris with user_role_add; numeric profile keys from a data export; profiles confused with UIDs or GIDs in hand-written manifests.
Common situations: Porting /etc/user_attr 'profiles=' stanzas that used numeric references; CMDB role IDs reused for profiles; onboarding scripts generating manifests from spreadsheets.
Related errors
- Role names must be provided, not numbers
- Auth names must be provided, not numbers
- Profile names must be provided as an array, not a comma-sepa
- Password warning days must be provided as a number.
- Group names must be provided, not GID numbers.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/b704f0f16193cc98.
Report an issue: GitHub.