Last active
December 1, 2018 13:23
-
-
Save stevenfollis/88c82b71e273b9ebe570b1d7a0cd9e39 to your computer and use it in GitHub Desktop.
Docker Compose files to distribute and delete gMSA Cred Spec files across a Swarm Cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Distribute a Credential Spec file to all Windows Server cluster nodes | |
# gmsa.json by default, else set $env:CREDSPEC with filename | |
version: '3.3' | |
configs: | |
credspec: | |
file: ${ProgramData}/Docker/CredentialSpecs/${CREDSPEC:-gmsa.json} | |
services: | |
copy: | |
command: cmd /c copy credspec C:\\out\\${CREDSPEC:-gmsa.json} | |
configs: | |
- credspec | |
deploy: | |
mode: global | |
restart_policy: | |
condition: none | |
placement: | |
constraints: | |
- node.platform.os == windows | |
image: microsoft/nanoserver | |
volumes: | |
- source: ${ProgramData}/Docker/CredentialSpecs | |
target: C:\out | |
type: bind |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete a Credential Spec file from all Windows Server cluster nodes | |
# gmsa.json by default, else set $env:CREDSPEC with filename | |
version: '3.3' | |
services: | |
copy: | |
command: cmd /c del C:\\out\\${CREDSPEC:-gmsa.json} | |
deploy: | |
mode: global | |
restart_policy: | |
condition: none | |
placement: | |
constraints: | |
- node.platform.os == windows | |
image: microsoft/nanoserver | |
volumes: | |
- source: ${ProgramData}/Docker/CredentialSpecs | |
target: C:\out | |
type: bind |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment