Skip to content

Commit c6577ca

Browse files
committed
(MODULES-7553) Add Example Clarification
A user trying to follow our advanced example ran into an issue. The example as written is only suitable for setups that are using local accounts, not domain accounts. They also found that the Facter fact `domain` returns the FQDN of the domain, which is not suitable for contsructing user names in the `netbiosname\username` format. This change adds a clarification to the example that the example is only usable when using local group, and given that there is no `netbiosname` fact available, provides a suggestion for one way to work around the issue.
1 parent 4607e81 commit c6577ca

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,21 @@ sqlserver_tsql {'check advanced sp_configure':
253253
value => 2048
254254
}
255255
```
256+
*Note:*
257+
$facts['hostnane'] is only suitable for building login names for local machine logins. For building domain logins you will need the domain name instead. $facts['domain'] returns the full domain name which will usually not be what you need. Try instead:
258+
259+
```puppet
260+
$netbios_name = split($facts['domain'],'\.')[0]
261+
262+
$dba_group_netbios_name = "${netbios_name}\\DB Administrators"
263+
264+
sqlserver::role { 'sysadmin':
265+
ensure => 'present',
266+
instance => 'MSSQLSERVER',
267+
type => 'SERVER',
268+
members => [$dba_group_netbios_name, $facts['id']],
269+
}
270+
```
256271

257272
## Reference
258273

0 commit comments

Comments
 (0)