Skip to content

Commit

Permalink
Fixed up ps modules for older hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
jborean93 committed May 14, 2018
1 parent 2105bb4 commit 2ac6559
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions roles/packer-setup/tasks/secondary_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
get_url:
dest: '{{man_packer_setup_host_type}}/iso/{{item.file|default()}}'
url: '{{item.url}}'
force: no
register: pri_packer_setup_bootstrap_download_res
with_items: '{{pri_packer_setup_config.bootstrap_files}}'

Expand Down
13 changes: 10 additions & 3 deletions roles/sysprep/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@

- name: create PackerWindoze PowerShell module folder
win_file:
path: C:\Program Files\WindowsPowerShell\Modules\PackerWindoze\{{man_packer_windoze_version}}
path: C:\Program Files\WindowsPowerShell\Modules\PackerWindoze
state: directory

- name: copy across the PackerWindoze manifest file
win_copy:
src: PackerWindoze.psm1
dest: C:\Program Files\WindowsPowerShell\Modules\PackerWindoze\{{man_packer_windoze_version}}\PackerWindoze.psm1
dest: C:\Program Files\WindowsPowerShell\Modules\PackerWindoze\PackerWindoze.psm1

- name: template across the PackerWindoze definition file
win_template:
src: PackerWindoze.psd1
dest: C:\Program Files\WindowsPowerShell\Modules\PackerWindoze\{{man_packer_windoze_version}}\PackerWindoze.psd1
dest: C:\Program Files\WindowsPowerShell\Modules\PackerWindoze\PackerWindoze.psd1

- name: make sure module path is added to PSModulePath
win_path:
name: PSModulePath
scope: machine
state: present
elements: C:\Program Files\WindowsPowerShell\Modules

- name: template the unattend.xml file
win_template:
Expand Down

0 comments on commit 2ac6559

Please sign in to comment.