Im fairly new to foreman and I'm sure this should be possible but can't
figure it out. I am setting multiple foreman users and need to filter the
hosts available to them based on hostname. The hostname naming convention
in my company is a bit backwards - hostnames are prefixed with the team
responsible for it, eg test-server1, dev-server1 etc. What i mean is that a
user needs to be restricted to machines called test-* or dev-*, etc.
I'm pretty sure I need to be able to create a filter with wildcards (or
even full on regex) but the only operators available are standard numeric
ones (no 'like' or ~) and I cant find any wildcard characters (ive tried %
and *).
Are wildcards supported? This seems quite a basic feature - Im sure I'm
missing something.
You are correct, regexs do not seem to be available for fact filters. Feel
free to open a feature request for it.
In the meantime, I'd probably solve this with usergroups - add all the
"test" staff to a "Test" usergroup, and then assign hosts to the "Test"
usergroup - then when you tick "Owned Hosts" they should be able to see the
hosts in the Test group.
HTH,
Greg
···
On 20 August 2013 10:50, Jeff wrote:
Hi All,
Im fairly new to foreman and I’m sure this should be possible but can’t
figure it out. I am setting multiple foreman users and need to filter the
hosts available to them based on hostname. The hostname naming convention
in my company is a bit backwards - hostnames are prefixed with the team
responsible for it, eg test-server1, dev-server1 etc. What i mean is that a
user needs to be restricted to machines called test-* or dev-*, etc.
I’m pretty sure I need to be able to create a filter with wildcards (or
even full on regex) but the only operators available are standard numeric
ones (no ‘like’ or ~) and I cant find any wildcard characters (ive tried %
and *).
Are wildcards supported? This seems quite a basic feature - Im sure I’m
missing something.
I think there might be better filter, but this should work too:
name ~ "dev-"
I don't think we support regexp, but this is like LIKE operator.
LZ
···
On Tue, Aug 20, 2013 at 02:50:48AM -0700, Jeff wrote:
> Hi All,
>
> Im fairly new to foreman and I'm sure this should be possible but can't
> figure it out. I am setting multiple foreman users and need to filter the
> hosts available to them based on hostname. The hostname naming convention
> in my company is a bit backwards - hostnames are prefixed with the team
> responsible for it, eg test-server1, dev-server1 etc. What i mean is that a
> user needs to be restricted to machines called test-* or dev-*, etc.
>
> I'm pretty sure I need to be able to create a filter with wildcards (or
> even full on regex) but the only operators available are standard numeric
> ones (no 'like' or ~) and I cant find any wildcard characters (ive tried %
> and *).
>
> Are wildcards supported? This seems quite a basic feature - Im sure I'm
> missing something.
>
> Thanks
> Jeff
>
> --
> You received this message because you are subscribed to the Google Groups "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
> To post to this group, send email to foreman-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/groups/opt_out.
···
On Tuesday, 20 August 2013 12:24:31 UTC+1, Greg Sutcliffe wrote:
>
> On 20 August 2013 10:50, Jeff <je...@potchin.co.uk > wrote:
>
>> Hi All,
>>
>> Im fairly new to foreman and I'm sure this should be possible but can't
>> figure it out. I am setting multiple foreman users and need to filter the
>> hosts available to them based on hostname. The hostname naming convention
>> in my company is a bit backwards - hostnames are prefixed with the team
>> responsible for it, eg test-server1, dev-server1 etc. What i mean is that a
>> user needs to be restricted to machines called test-* or dev-*, etc.
>>
>> I'm pretty sure I need to be able to create a filter with wildcards (or
>> even full on regex) but the only operators available are standard numeric
>> ones (no 'like' or ~) and I cant find any wildcard characters (ive tried %
>> and *).
>>
>> Are wildcards supported? This seems quite a basic feature - Im sure I'm
>> missing something.
>>
>
> You are correct, regexs do not seem to be available for fact filters. Feel
> free to open a feature request for it.
>
Okay, what Greg says. Also, you may want to enable
Organizations/Locations and use Location for that. I should use "abuse"
word instead Location, but maybe you separate those groups physically as
well.
···
On Tue, Aug 20, 2013 at 12:29:29PM +0100, Greg Sutcliffe wrote:
> > name ~ "dev-"
>
> The User Fact Filters cannot select "~" as a matcher, try it yourself ;)
Sorry, I must be missing something here. Where is the organisations
configuration? Any documentation?
···
On Tuesday, 20 August 2013 13:17:17 UTC+1, Greg Sutcliffe wrote:
>
> Actually Organisations is a very good fit here, as users won't see hosts
> outside their own Org. Give that a try :)
>
> Greg
>