Skip to content

Commit

Permalink
Windows - make sure profile directory exists so we can put things in …
Browse files Browse the repository at this point in the history
…it (#18)

* Deal with user-profile creation with user-creation

* Unfortunately 2.8 has some other things in it too that I don't know how to port into here
  • Loading branch information
Peter Mounce authored May 27, 2019
1 parent adb8013 commit 40f673a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
# core
buildkite_agent_conf_dir:
buildkite_agent_conf_dir: # https://github.com/buildkite/agent/blob/master/clicommand/agent_start.go#L100
Darwin: "/usr/local/etc/buildkite-agent"
Debian: "/etc/buildkite-agent"
Windows: "c:/buildkite-agent"
Windows: "c:/users/buildkite-agent/AppData/Local/buildkite-agent"
buildkite_agent_count: 1
buildkite_agent_debug: "false"
buildkite_agent_hide_secrets: true
Expand All @@ -19,6 +19,8 @@ buildkite_agent_allow_service_startup:
Darwin: true
Debian: true
Windows: true
# If you want to see generated user password in your ansible output for debugging, set to true.
buildkite_agent_expose_secrets: false

# paths config
buildkite_agent_builds_dir:
Expand Down
7 changes: 7 additions & 0 deletions tasks/install-on-Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
password_never_expires: yes
user_cannot_change_password: yes

# when a user is created, their profile directory only starts to exist after first process / logon as that user.
# we definitely need this to exist for things like .ssh/* and friends.
- name: make the user profile
win_user_profile:
username: "buildkite-agent"
state: present

- name: grant administrator privileges to user
win_group_membership:
name: Administrators
Expand Down

0 comments on commit 40f673a

Please sign in to comment.