diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py index a194bff9d..3b6d6b5f4 100644 --- a/tripleoclient/utils.py +++ b/tripleoclient/utils.py @@ -2310,7 +2310,7 @@ def copy_clouds_yaml(user): :param user: deployment user """ clouds_etc_file = '/etc/openstack/clouds.yaml' - clouds_home_dir = os.path.join('/home', user) + clouds_home_dir = os.path.expanduser("~{}".format(user)) clouds_config_dir = os.path.join(clouds_home_dir, '.config') clouds_openstack_config_dir = os.path.join(clouds_config_dir, 'openstack') diff --git a/tripleoclient/v1/tripleo_deploy.py b/tripleoclient/v1/tripleo_deploy.py index fc7b84179..df7595703 100644 --- a/tripleoclient/v1/tripleo_deploy.py +++ b/tripleoclient/v1/tripleo_deploy.py @@ -1410,6 +1410,12 @@ class Deploy(command.Command): def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) + if parsed_args.deployment_user == 'root': + self.log.warning( + _("[WARNING] Deployment user is set to 'root'. This may cause " + "some deployment files to be located in /root. Please use " + "--deployment-user to specify the user you are deploying " + "with.")) try: if parsed_args.standalone: self._standalone_deploy(parsed_args)