GithubHelp home page GithubHelp logo

voxpupuli / puppet-msoffice Goto Github PK

View Code? Open in Web Editor NEW
4.0 37.0 19.0 276 KB

puppet module to manage Microsoft Office on Windows (2003-2013)

Home Page: https://forge.puppet.com/puppet/msoffice

License: MIT License

Ruby 55.47% Puppet 39.01% HTML 4.57% Dockerfile 0.95%
puppet windows-puppet-module hacktoberfest

puppet-msoffice's People

Contributors

alexjfisher avatar bastelfreak avatar bbriggs avatar binford2k avatar bradh avatar cedricve avatar dhollinger avatar dhoppe avatar ekohl avatar igalic avatar juniorsysadmin avatar jyaworski avatar liamjbennett avatar llowder avatar mterzo avatar regnarg avatar sacres avatar sandra-thieme avatar smortex avatar tragiccode avatar vinzent avatar wyardley avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-msoffice's Issues

Error when installing Office Home and Business 2010

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.10
  • Ruby: 2.4.5p335 (2018-10-18 revision 65137) [x64-mingw32]
  • Distribution: ???
  • Module version: 3.1.2

How to reproduce (e.g Puppet code you use)

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',
  }

What are you seeing

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]

What behaviour did you expect instead

no error

Any additional information you'd like to impart

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.

Ruby compatibility issue

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.17
  • Ruby: 2.4.9
  • Distribution:
  • Module version: 3.1.2

How to reproduce (e.g Puppet code you use)

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'
}

What are you seeing

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

What behaviour did you expect instead

Output log

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)

Any additional information you'd like to impart

More fine grained feature installation

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.

Feature request: allow $deplyment_root to be the absolute path to a directory

The module assumes certain directory structure for the Office installation sources.
For example

$office_root = "${deployment_root}\\OFFICE${office_num}\\${edition}\\${arch}"
contains:

   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

Related issues: #50 #9

Affected Puppet, Ruby, OS and module versions/distributions

add "lockfile" to support long installs or a slow network

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.

support installing office viewers

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.

  • Add list of download links to wiki

Installing without a Service Pack

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).

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.9.3
  • Ruby: 2.1.5p273
  • Module version: Git commit 05d4af1 (i.e. master as of 2017-04-25)

Correction of license key regex validation

i had to change the regex above for valitade de license key correctly.

validate_re($license_key,'^[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}$', 'The license_key argument speicifed is not correctly formatted')

Office 365

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.

dependencies problem

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)

Operator '[]' is not applicable to an Undef Value.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.8.0
  • Module version: 2.1.0

How to reproduce (e.g Puppet code you use)

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',
}

What are you seeing

I'm a getting an Error 500 on server when running puppet agent.

What behaviour did you expect instead

Office products installed according to the configuration mentioned

Output log

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.

update expected folder structure

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.

Office 2003 service packs do not have the /norestart option

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.

support additional office products

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.

  • Add wiki page.

dependencies issues with puppetlabs-powershell

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.7.0
  • Ruby: ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
  • Distribution: CentOS 7.2.1511
  • Module version: ?

How to reproduce (e.g Puppet code you use)

try to install the puppet-msoffice module with the latest puppetlabs-powershell module installed

What are you seeing

[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)

What behavior did you expect instead

The module to install

Output log

not required

Any additional information you'd like to impart

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.