diff --git a/doc/topics/cloud/linode.rst b/doc/topics/cloud/linode.rst index 1a2cec7e61..6b22ef7701 100644 --- a/doc/topics/cloud/linode.rst +++ b/doc/topics/cloud/linode.rst @@ -177,3 +177,7 @@ problems. setting. .. _Pull Request #733: https://github.com/saltstack/salt-bootstrap/pull/733 + +If the ``machine_to_clone`` does not have Salt installed on it, refrain from using +the ``script_args: -C -F`` altogether, because the new machine will need to have +Salt installed. diff --git a/salt/config.py b/salt/config.py index 410e77988e..5f1d860260 100644 --- a/salt/config.py +++ b/salt/config.py @@ -2602,9 +2602,17 @@ def is_profile_configured(opts, provider, profile_name): provider_key = opts['providers'][alias][driver] profile_key = opts['providers'][alias][driver]['profiles'][profile_name] + # If cloning on Linode, size and image are not necessary. + # They are obtained from the to-be-cloned VM. + linode_cloning = False + if driver == 'linode' and profile_key.get('clonefrom'): + linode_cloning = True + non_image_drivers.append('linode') + non_size_drivers.append('linode') + if driver not in non_image_drivers: required_keys.append('image') - elif driver == 'vmware': + elif driver == 'vmware' or linode_cloning: required_keys.append('clonefrom') elif driver == 'nova': nova_image_keys = ['image', 'block_device_mapping', 'block_device']