| I managed to reliably reproduce this problem. The culprit is the HOMEDRIVE and HOMEPATH environment variables. When a Windows admin configures the "Home folder" of an Active Directory user to connect to a network drive, the HOMEDRIVE and HOMEPATH environment variables for the user will change on the Windows client:
- User with Home folder set to a network drive (H
- HOMEDRIVE = H:
- HOMEPATH = \
- User with Home folder not configured
- HOMEDRIVE = C:
- HOMEPATH = \Users\username
When 'bolt puppetfile install' runs the first time, it will attempt to create a .r10k directory in %HOMEDRIVE%%HOMEPATH%, which translates to H:\.r10k for the user with a home network drive, and C:\Users\testuser\.r10k for the user without a home network drive. If the user is disconnected from their network drive, r10k fails to create the .r10k folder and the errors in the screenshot appear. I have verified that running the following commands first will work as a temporary workaround:
$Env:HOMEDRIVE = C: |
$Env:HOMEPATH = "\Users\$Env:USERNAME" |
If the user's home network drive is connected, r10k does work and no workaround is needed. However, having the .r10k folder created on the user's home network drive is undesirable. The same goes for the Bolt analytics file, which ends up at H:\.puppetabs\bolt\analytics.yaml in the connected home network drive scenario. These things should go to the user's profile, not their home network drive:. On Windows:
- r10k should use the LOCALAPPDATA environment variable
- Bolt should use the APPDATA environment variable
|