5519 Commits

Author SHA1 Message Date
Aurelien Pupier
c423619cd7 Remove requirements on path without space as issue was fixed in Ruby 2016-11-08 16:39:43 +01:00
Chris Roberts
f045f74d86 Only proceed if confirmation is matched. Do not continue if user aborted. 2016-11-07 19:25:32 -08:00
Chris Roberts
b15ef3a6ff Add plugin expunge command to remove all user installed plugins 2016-11-07 18:48:51 -08:00
Chris Roberts
5d68c8c30b Include plugin repair command 2016-11-07 18:48:51 -08:00
Chris Roberts
dbbd2d8e36 Remove deprecated methods and update tests. 2016-11-07 18:48:14 -08:00
Chris Roberts
d1a778dbfb Include error handling when subprocess commands fail 2016-10-31 07:42:30 -07:00
Chris Roberts
90db9c95b8 Refactor linux host NFS to share common functionalities 2016-10-29 17:53:58 -07:00
Chris Roberts
40dc0de665 Use Util::StringBlockEditor to modify /etc/exports 2016-10-29 15:46:35 -07:00
Aron Griffis
7e83edd643 Rewrite linux/nfs_cleanup for security and multi-user, fixes #7938
Avoid using a temporary file, rather do the substitution in Ruby and
write /etc/exports directly.
2016-10-29 15:46:35 -07:00
Chris Roberts
58c3be9344 Default the puppet config environment variables to an empty hash 2016-10-27 15:14:13 -07:00
Chris Roberts
9b12d4db48 Pass configuration environment variables to apply command 2016-10-26 09:51:56 -07:00
Azul
a4408037ba add support for environment variables on a puppet apply run 2016-10-26 09:36:34 -07:00
Chris Roberts
dd7294b021 Merge pull request #7928 from chrisroberts/rsync/exclude-paths
synced_folders/rsync: Quote exclude paths
2016-10-26 07:16:15 -07:00
Chris Roberts
eb7568b2ed Merge pull request #7922 from chrisroberts/netbsd/rsync
guests/netbsd: Use full path to pkg_add command
2016-10-25 18:51:42 -07:00
Chris Roberts
be3fa85853 Merge pull request #7921 from chrisroberts/fix/key-fixups
Remove `set -e` usage for better shell compatibility
2016-10-25 14:43:04 -07:00
Chris Roberts
365b98fee6 Merge pull request #7926 from chrisroberts/networking/rhel
guests/redhat: Force NetworkManager to reload device configurations
2016-10-25 14:41:07 -07:00
Chris Roberts
fc6824e79c guests/netbsd: Include /usr/sbin in PATH for pkg_add command 2016-10-25 14:22:38 -07:00
Chris Roberts
05c5aab92a synced_folders/rsync: Escape exclude paths 2016-10-25 13:59:03 -07:00
Chris Roberts
c39b3fbb76 guests/openbsd: Check package installation after installing package
The `pkg_add` command will return `0` when a package requested for
installation is not found. This adds a validation check to ensure
the rsync package is actually installed on the guest.
2016-10-25 12:16:52 -07:00
Chris Roberts
67f3c8b48c guests/redhat: Force NetworkManager to reload device configurations
When configuring network devices force NetworkManager to reload new
configuration files as they appear. This prevents NetworkManager from
attempting to continue managing devices on initial start up.
2016-10-25 07:45:38 -07:00
Chris Roberts
fb4e4320b2 Remove set -e usage for better shell compatibility 2016-10-24 10:30:08 -07:00
Chris Roberts
3ee2bca793 Merge pull request #7907 from chrisroberts/salt-config/defaults
provisioners/salt: Synchronize config defaults with documentation
2016-10-24 07:07:41 -07:00
Gilles Cornu
b9174895a5
provisioners/ansible (minor): Fix alphabetical order of base attributes
This point was missed in #6627.
2016-10-23 20:46:30 +02:00
Gilles Cornu
a842abbc38
provisioners/ansible(both): Add config_file option
With this new option defined, the `ansible-galaxy` and
`ansible-playbook` commands generated by the Ansible provisioners will
be executed with the ANSIBLE_CONFIG environment variable set
accordingly.

Resolve GH-7195

This commit also fix the following open issues:
- Implement the pending RSpec examples about path existence checks
  performed by the ansible (remote) provisioner.
- In verbose mode, the ansible remote provisioner now correctly displays
  the Ansible Galaxy parameters ("role_file" and "roles_path") with
  single quotes (which is safer for potential copy-paste usage).

Additional Notes:
- Test coverage for `ansible_local` provisioner is still not
  implemented. See GH-6633.
- Test coverage for galaxy from host is not implemented yet (due to
  general issue with mocking both command executions, see
  https://github.com/mitchellh/vagrant/pull/6529#r45278451
2016-10-22 01:09:12 +02:00
Gilles Cornu
d56cf55a89
provisioners/ansible_local: Use quotes for path checking
Without this fix, the ansible_local provisioner fails to check the
existence of a filesystem path that contains a blank/space character.
2016-10-21 16:44:18 +02:00
Gilles Cornu
432f79339c
provisioners/ansible(base): Add parenthesis for better readability
Make more evident on what the "if modifiers" (aka trailing conditionals) apply.
2016-10-21 16:43:37 +02:00
Bjorn Brala
37a525fbbc Little bit of cleanup. 2016-10-20 22:43:00 +02:00
Bjorn Brala
e6093dd709 The virtual machine doesnt need 'Virtual Machines' in its path, this is created when importing. 2016-10-19 21:03:48 +02:00
Bjorn Brala
c075c026be Keyboard language setting made my comment bad 2016-10-19 20:56:52 +02:00
Bjorn Brala
055bed5918 removed an extra echo and added proper error message when there is incompatibilities. Appearantly importing into a compressed folder wont work and will result in an error. 2016-10-19 20:55:56 +02:00
Chris Roberts
fa2a9105f0 provisioners/salt: Synchronize config defaults with documentation 2016-10-17 10:11:39 -07:00
Brian Retford
418064519d Move dynamic memory settings into conditional block 2016-10-14 18:53:44 -07:00
Jake Ballard
803fff7f03 Fix issue with missing slash in paths
It was failing to create files below the machines\default\hyperv folder, rather it was creating folders named 'hypervSnapshots', 'hypervVirtual Hard Disks', and 'hypervVirtual Machines'. This was causing the files to not be removed when destroying the vm, and an error when subsequently bringing it up again.
2016-10-11 15:31:28 -05:00
Chris Roberts
b9ea9a2ac2 Merge pull request #7887 from chrisroberts/guests/linux-detection
Guests/linux detection
2016-10-11 12:55:52 -07:00
Chris Roberts
9d61d7c61b Merge pull request #7818 from rswarts/vz7flavor
Add Virtuozzo Linux 7 to list of RHEL flavors
2016-10-11 10:35:20 -07:00
Chris Roberts
d0549d6e11 guests/linux: Provide common linux detection style
Defines a common and generic linux detection strategy which can be
subclassed and easily reused by providing a custom detection constant.
2016-10-11 07:50:34 -07:00
Reto Gantenbein
6050b13f43 Make Debian guest detection more reliable
/etc/issue is far from being a reliable source for OS detection as it
can be changed by a user without affecting any OS functionality. As
newer Debian systems run systemd by default, check for /etc/os-release
and fallback to lsb_release for older Debian versions. Check #7625 for
a similar issue. Even lsb_release is not manatory, therefore keep the
current code of parsing /etc/issue to avoid regressions.
2016-10-11 07:49:35 -07:00
Gilles Cornu
a55590b84f
provisioners/ansible_local: Change binary detection
- Remove `ansible-galaxy` detection, since this command was introduced
  in Ansible 1.4.2 (December 2013). Checking for `ansible-playbook`
  presence should therefore be enough for any "modern" Ansible setup.
- Look for the command defined by the new `playbook_command` option.

Related to GH-7881 and GH-7536
2016-10-10 23:24:19 +02:00
Gilles Cornu
b1ddc98e17
Merge pull request #7881 (Add playbook_command option)
Note that error messages were not adapted, and only mention
a generic "Ansible Software" when executed commands are failing.
We assume that people using the `playbook_command` option are
advanced users that will know all the components to be considered.
2016-10-10 23:18:24 +02:00
Gilles Cornu
26e8bdc1f1
Merge pull request #7536 2016-10-10 23:03:00 +02:00
Chris Roberts
07ce1c6930 Merge pull request #7866 from chrisroberts/guest-linux/network-interfaces-sorting
guests/linux: Update network interface sorting implementation
2016-10-10 10:59:52 -07:00
Chris Roberts
7eb1091a71 Merge pull request #7874 from chrisroberts/enhancement/cast-box-version
config/vm: cast box version to string before string operations
2016-10-10 10:57:53 -07:00
Chris Roberts
a8970281ce guests/linux: Properly sort interface name types
Add failing networking interface list sorting test with example
provided by #7883. Update sorting logic to properly handle different
types and differing array lengths.

Fixes #7883
2016-10-10 10:22:19 -07:00
Bjorn Brala
42efd5c198 Make the Virtual Hard Disks directory if importing from XML to keep it consistant across config types 2016-10-09 21:10:56 +02:00
Daniel Gonzalez
58f2b0c8c7 Make ansible-playbook command configurable
The ansible-playbook command is currently hardcoded for the ansible and
ansible_local provisioners. This patch adds the config option
playbook_command to allow the user to change the command.
2016-10-09 20:48:50 +02:00
Bjorn Brala
8744caebcf Small typo in options 2016-10-09 20:39:17 +02:00
Bjorn Brala
7b03bf335b Whitespace 2016-10-08 16:44:24 +02:00
Bjorn Brala
debe50957b Refactor the import script to fully use Compare-VM for creating the new VM.
Implemented the differencing disk for vmcx.
This means the disk is now copied by Hyper-V (Powershell) instead of Ruby for new machines.
This does mean EFI Firmware now does work for machines since it is quite a feep copy. Compare-VM will report incompatibilities should they be found.
2016-10-08 16:38:42 +02:00
Chris Roberts
d178631ff9 Generic white space strip from command strings 2016-10-07 17:30:27 -07:00
Chris Roberts
703513bd0f Revert "Fix incorrect ssh-config output when '--host' is defined"
This reverts commit c77326438b86a40bbc0d3ec93bbea7ec520392db.
2016-10-07 16:50:12 -07:00