voxpupuli / puppet-msoffice Goto Github PK
View Code? Open in Web Editor NEWpuppet module to manage Microsoft Office on Windows (2003-2013)
Home Page: https://forge.puppet.com/puppet/msoffice
License: MIT License
puppet module to manage Microsoft Office on Windows (2003-2013)
Home Page: https://forge.puppet.com/puppet/msoffice
License: MIT License
Using a German installation DVD of Office Home and Business 2010 I copied the folder 'x86' from the root directory of the DVD to my harddrive into the folder "C:\Users\User\AppData\Local\Temp\OFFICE14\Home and Business\x86".
Then I execute this puppet code:
msoffice { 'Office 2010':
ensure => present,
version => '2010',
edition => 'Home and Business',
sp => '2',
lang_code => 'de-de',
license_key => $office_license,
products => ['Excel'],
deployment_root => 'C:\\Users\\User\\AppData\\Local\\Temp',
}
The following error message occurs during the puppet run:
Error: '"C:\Users\User\AppData\Local\Temp\OFFICE14\Home and Business\x86\setup.exe" /modify Home and Business /config "C:\Windows\Temp\office_config.xml"' returned 30066 instead of one of [0]
Error: /Stage[main]/Profile_orchid::Orchid_excel::Install/Msoffice[Office 2010]/Msoffice::Package[microsoft office 2010]/Exec[upgrade-office]/returns: change from 'notrun' to ['0'] failed: '"C:\Users\User\AppData\Local\Temp\OFFICE14\Home and Business\x86\setup.exe" /modify Home and Business /config "C:\Windows\Temp\office_config.xml"' returned 30066 instead of one of [0]
no error
First of all the quotes for the value "Home and Business" of the 'modify' switch are obviously missing. Unfortunately executing the command directly with added quotes does not work either. The error message is different, though (actually the error message above is generated when the quotes are present).
Playing around I've figured out that I need to pass the value "SingleImage" to the 'modify' switch for this command to work. I can find this string in the file 'E:\x86\SingleImage.WW\setup.xml' on my installation DVD (it's the 'Id' attribute of the 'setup' tag).
I conclude that the value for 'office_product' as defined in the params.pp does not work in every case. So I suggest an additional module parameter (e.g. named 'setup_id') that can be used to pass the correct Id.
Install puppet 5.5.17, create profile
msoffice { 'office 2010':
version => '2010',
edition => 'Professional Plus',
sp => '2',
license_key => '******'
ensure => present,
deployment_root => 'network location'
}
Puppet 5.5.17 internally uses ruby version 2.4.9 which doesn't have validate_re syntax. I checked previous tags 3.1.1, 3.1.0 and 3.0.0 all are using validate_re
Warning: ModuleLoader: module 'msoffice' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules\n (file & line not available)
Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown function: 'validate_re'. (file: //msoffice/manifests/init.pp, line: 70, column: 3)
The puppet run errors on Exec['upgrade-office']. When looking into the log it fails with the error:
Failed to check free space on drive "" ErrorCode: 3(0x3)
Manage desktop and quick launch toolbar shortcuts using http://forge.puppetlabs.com/puppetlabs/win_desktop_shortcut
Office versions pre-2010 require the office compatibility pack to be installed in order to support the Office Open XML format documents.
Office 95/97/XP/2000/ - just for fun!
#5 will help with this
It appears that the regex for license_key is broken and needs to be fixed otherwise office will not install.
MSI=<%= office_product.upcase %>.MSI
but should be
MSI=<%= office_product.upcase %>11.MSI
At the moment the module only supports installing the full products in the office suite.
It would be useful to be able so install/upgrade the subcomponents of the products for scenarios where you want to limit the installation footprint.
The module assumes certain directory structure for the Office installation sources.
For example
puppet-msoffice/manifests/package.pp
Line 89 in 54baeef
if $version == '2010' {
$office_root = "${deployment_root}\\OFFICE${office_num}\\${edition}\\${arch}"
} else {
$office_root = "${deployment_root}\\OFFICE${office_num}\\${edition}"
}
In case of installing office from a mounted ISO this path won't work, because one apparently cannot simply copy the contents of a mounted ISO into an arbitrary location (see for example https://answers.microsoft.com/en-us/msoffice/forum/msoffice_other-mso_other/unable-to-install-office-2010-from-dvd-setup/08b6db56-dec7-4164-860a-310f3c1ae7d2). Running setup.exe
from such location results in "Setup cannot find the required setup controller file".
A workaround when installing from an ISO mount is to set $office_root to the disk of the ISO mount, for example $office_root = 'd:'
I'm suggesting $deployment_root
to become the absolute path to the Office sources directory root (where setup.exe
is located). In order not to break the current behavior, this could be achieved by introducing a new boolean, e.g. deployment_root_absolute
which will switch between the current meaning of $deployment_root
and the proposed one. Something along the lines of marcindulak@1fd0c73
As more features are added to the module then the overall compilation of the catalog will take much longer. In addition to that we are deploying from software on a network share and a slow network can cause slow installation times.
With slow or longer installation times it increases the likelihood that a second puppet run will trigger and try and exec a second installation (and fail) mid-way through the initial installation.
The solution to this is a exec-create a lockfile, onlyif the installation and then delete the file at the end of the installation.
In scenarios when your only installing a partial set of the office products to your clients you often want to also install the available office viewers for the remaining products in the suite.
Hello,
How exactly should one request installation of Office for a version which does not have any Service Packs available, e.g. 2013 or 2016? At the moment I try to do it like this:
msoffice { 'Office 2013': ensure => present, version => '2013', edition => 'Professional Plus', sp => '0', arch => 'x64', lang_code => 'de-de', deployment_root => 'foo', license_key => 'bar', products => ['Word'], }
because not having set sp at all produced an error. However, when ${sp} is set to 0 I get an error from msoffice::servicepack "the service pack specified does not match 1-3". An interesting thing is, this happens even when Puppet tries to install Office on a system which doesn't have it - even though according to the documentation this module should only attempt to install SPs and LIPs once Office has already been installed. I've had a look at the code but it only got me more confused: unless I have misunderstood, it seems SPs and LIPs are installed when the ensure option is set to 'present', regardless of whether Office has actually been installed or not, which is at odds with documentation (although it does explain why I see the problem).
i had to change the regex above for valitade de license key correctly.
validate_re(
Manage "HKLM\Software\Microsoft\Office" and "HKCU\Software\Microsoft\Office" registry settings.
Support as many known options as possible.
There is any way to put the license_key after the instalation? I'm using the Office365 and it doesn't give license keys, it Works with internet loggin.
Windows supports running applications in compatibility mode - which can allow running older versions of office on newer versions of windows.
Error: Could not install module 'liamjbennett-msoffice' (latest: v0.0.2)
No version of 'joshcooper-powershell' will satisfy dependencies
'cyberious-pget' (v0.1.3) requires 'joshcooper-powershell' (>= 0.0.6)
'liamjbennett-msoffice' (v0.0.2) requires 'joshcooper-powershell' (v0.0.4)
'liamjbennett-windows_firewall' (v0.0.3) requires 'joshcooper-powershell' (>= 0.0.4)
Currently office 2010 pro plus office_product is set to ProPlus where as it should be ProPlusr (additional r)
msoffice { 'office 2013':
version => '2013',
edition => 'Professional Pro',
sp => '1',
license_key => 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX',
products => ['Words', 'Excel'],
ensure => present,
deployment_root => 'C:\Users\XXX\Desktop\SW_DVD5_Office_Professional_Plus_2013w_SP1_32-BIT_X64_English_MLF_X19-35900.ISO',
}
I'm a getting an Error 500 on server when running puppet agent.
Office products installed according to the configuration mentioned
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Serve
r Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluati
on Error: Operator '[]' is not applicable to an Undef Value. at /etc/puppetlabs/
code/environments/production/modules/msoffice/manifests/package.pp:83:21 at /etc
/puppetlabs/code/environments/production/modules/msoffice/manifests/init.pp:85 o
n node w-buildslave01.xxx.com## Any additional information you'd like to impart
*** I didn't any change on the msoffice module files.
Some office 2003 licenses contains 0-9 chars. Need to add this to the validation regex.
In order to support the "extras" - LIPs, SPs, viewers etc the expected folder structure in the deployment root will need to be altered. This is a non-backwards compatible change so I will need to update the referenced $office_root (to $office_root\Base) and the wiki + README.md to make this clear.
The current assumption is that the options for the service pack installation are /q and /norestart but office 2003 service packs (tested with sp1) do not contain the /norestart option and therefore a dialog box is thrown with a error during the catalog run.
When installing on pre-SP2 Windows XP it fails because it doesn't have powershell installed. Need to add check for powershell or dependency on a module to install it.
There are a number of products in each version office that are considered part of the overall suite but are distributed separately. The module should support all of these additional products.
try to install the puppet-msoffice module with the latest puppetlabs-powershell module installed
[root@puppet ~]# puppet module install puppet-msoffice
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Error: Could not install module 'puppet-msoffice' (???)
No version of 'puppet-msoffice' can satisfy all dependencies
Use puppet module install --ignore-dependencies
to install only this module
[root@puppet ~]# puppet module list
/etc/puppetlabs/code/environments/production/modules
├── badgerious-windows_env (v2.2.2)
├── chocolatey-chocolatey (v1.2.6)
├── custom_files (???)
├── puppet-download_file (v2.0.0)
├── puppetlabs-dsc (v1.1.0)
├── puppetlabs-powershell (v2.0.3)
├── puppetlabs-reboot (v1.2.1)
└── puppetlabs-stdlib (v4.13.1)
this module requires:
puppetlabs/stdlib (>= 3.0.0 <5.0.0)
puppetlabs/powershell (>= 1.0.0 <2.0.0)
liamjbennett/win_facts (>= 0.0.1 <1.0.0)
The module to install
not required
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.