Created
January 31, 2017 04:55
-
-
Save jugatsu/81f5e662890e34fb2915a03eff7f3762 to your computer and use it in GitHub Desktop.
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
--- | |
- hosts: windows | |
gather_facts: true | |
tasks: | |
- name: Ensure Chef Client package is present. | |
win_package: | |
name: Chef Client | |
path: https://packages.chef.io/files/stable/chef/12.17.44/windows/2008r2/chef-client-12.17.44-1-x64.msi | |
product_id: '{7FC5FAC2-7AFE-4AE6-9548-DFE6F69B325D}' | |
state: present | |
- name: Ensure Chef Client configuration file is present. | |
win_template: | |
src: client.rb.j2 | |
dest: C:\chef\client.rb | |
- name: Ensure first-boot file is present. | |
win_template: | |
src: first-boot.json.j2 | |
dest: C:\chef\first-boot.json | |
- name: Ensure validation key is present. | |
win_copy: | |
src: chef-validator.pem | |
dest: C:\chef\validation.pem | |
- name: Run Chef Client. | |
win_command: chef-client -j C:\chef\first-boot.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment