def take_action(self, parsed_args):
        self.log.debug("take_action(%s)" % parsed_args)
        clients = self.app.client_manager
        orchestration = clients.orchestration
        verbosity = self.app_args.verbose_level
        stack = parsed_args.stack

        ansible_dir = None
        key = None
        # Disable mistral
        if parsed_args.no_workflow:
            ansible_dir = oooutils.download_ansible_playbooks(orchestration,
                                                              stack)
            key = package_update.get_key(clients)

        # Run ansible:
        limit_hosts = parsed_args.limit

        playbook = parsed_args.playbook
        inventory = oooutils.get_tripleo_ansible_inventory(
            parsed_args.static_inventory, parsed_args.ssh_user, stack)
        oooutils.run_update_ansible_action(self.log, clients, limit_hosts,
                                           inventory, playbook,
                                           constants.MINOR_UPDATE_PLAYBOOKS,
                                           parsed_args.ssh_user,
                                           (None if parsed_args.no_workflow
                                            else package_update),
                                           verbosity=verbosity,
                                           workdir=ansible_dir,
                                           priv_key=key)
    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)" % parsed_args)
        oooutils.ffwd_upgrade_operator_confirm(parsed_args.yes, self.log)
        verbosity = self.app_args.verbose_level
        clients = self.app.client_manager
        orchestration = clients.orchestration
        stack = parsed_args.stack

        ansible_dir = None
        key = None
        # Disable mistral
        if parsed_args.no_workflow:
            ansible_dir = oooutils.download_ansible_playbooks(
                orchestration, stack)
            key = package_update.get_key(clients)

        # Run ansible:
        inventory = oooutils.get_tripleo_ansible_inventory(
            inventory_file=parsed_args.static_inventory,
            ssh_user=parsed_args.ssh_user,
            stack=parsed_args.stack)
        # Don't expost limit_hosts. We need this on the whole overcloud.
        limit_hosts = ''
        oooutils.run_update_ansible_action(
            self.log,
            clients,
            limit_hosts,
            inventory,
            constants.FFWD_UPGRADE_PLAYBOOK, [],
            parsed_args.ssh_user,
            (None if parsed_args.no_workflow else package_update),
            verbosity=verbosity,
            workdir=ansible_dir,
            priv_key=key)
    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)" % parsed_args)
        clients = self.app.client_manager
        orchestration = clients.orchestration
        verbosity = self.app_args.verbose_level
        stack = parsed_args.stack

        ansible_dir = None
        key = None
        # Disable mistral
        if parsed_args.no_workflow:
            ansible_dir = oooutils.download_ansible_playbooks(orchestration,
                                                              stack)
            key = package_update.get_key(clients)

        # Run ansible:
        inventory = oooutils.get_tripleo_ansible_inventory(
            parsed_args.static_inventory, parsed_args.ssh_user, stack)
        limit_hosts = 'all'
        playbook = 'all'
        extra_vars = oooutils.parse_extra_vars(parsed_args.extra_vars)

        oooutils.run_update_ansible_action(
            self.log, clients, limit_hosts, inventory, playbook,
            constants.EXTERNAL_UPDATE_PLAYBOOKS, parsed_args.ssh_user,
            (None if parsed_args.no_workflow else package_update),
            tags=parsed_args.tags, skip_tags=parsed_args.skip_tags,
            verbosity=verbosity, extra_vars=extra_vars, workdir=ansible_dir,
            priv_key=key)

        self.log.info("Completed Overcloud External Update Run.")
Example #4
0
    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)" % parsed_args)
        clients = self.app.client_manager

        # Run ansible:
        nodes = parsed_args.nodes
        if nodes == 'all':
            # unset this, the ansible action deals with unset 'limithosts'
            nodes = None
        playbook = parsed_args.playbook
        inventory = oooutils.get_tripleo_ansible_inventory(
            parsed_args.static_inventory, parsed_args.ssh_user)
        oooutils.run_update_ansible_action(self.log, clients, nodes, inventory,
                                           playbook, constants.UPDATE_QUEUE,
                                           constants.MINOR_UPDATE_PLAYBOOKS,
                                           package_update,
                                           parsed_args.ssh_user)
Example #5
0
 def take_action(self, parsed_args):
     self.log.debug("take_action(%s)" % parsed_args)
     clients = self.app.client_manager
     # Run ansible:
     roles = parsed_args.roles
     nodes = parsed_args.nodes
     limit_hosts = roles or nodes
     playbook = parsed_args.playbook
     inventory = oooutils.get_tripleo_ansible_inventory(
         parsed_args.static_inventory, parsed_args.ssh_user)
     skip_tags = self._validate_skip_tags(parsed_args.skip_tags)
     oooutils.run_update_ansible_action(self.log, clients, limit_hosts,
                                        inventory, playbook,
                                        constants.UPGRADE_QUEUE,
                                        constants.MAJOR_UPGRADE_PLAYBOOKS,
                                        package_update,
                                        parsed_args.ssh_user, skip_tags)
Example #6
0
    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)" % parsed_args)
        oooutils.ffwd_upgrade_operator_confirm(parsed_args.yes, self.log)

        clients = self.app.client_manager

        # Run ansible:
        inventory = oooutils.get_tripleo_ansible_inventory(
            inventory_file=parsed_args.static_inventory,
            ssh_user=parsed_args.ssh_user,
            stack=parsed_args.stack)
        # Don't expost limit_hosts. We need this on the whole overcloud.
        limit_hosts = ''
        oooutils.run_update_ansible_action(self.log, clients, limit_hosts,
                                           inventory,
                                           constants.FFWD_UPGRADE_PLAYBOOK,
                                           constants.FFWD_UPGRADE_QUEUE, [],
                                           package_update,
                                           parsed_args.ssh_user)
Example #7
0
    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)" % parsed_args)
        clients = self.app.client_manager
        verbosity = self.app_args.verbose_level
        orchestration = clients.orchestration
        stack = parsed_args.stack

        ansible_dir = None
        key = None
        # Disable mistral
        if parsed_args.no_workflow:
            ansible_dir = oooutils.download_ansible_playbooks(
                orchestration, stack)
            key = package_update.get_key(clients)

        # Run ansible:
        limit_hosts = parsed_args.limit

        playbook = parsed_args.playbook
        inventory = oooutils.get_tripleo_ansible_inventory(
            parsed_args.static_inventory, parsed_args.ssh_user, stack)
        skip_tags = self._validate_skip_tags(parsed_args.skip_tags)
        oooutils.run_update_ansible_action(
            self.log,
            clients,
            limit_hosts,
            inventory,
            playbook,
            constants.MAJOR_UPGRADE_PLAYBOOKS,
            parsed_args.ssh_user,
            (None if parsed_args.no_workflow else package_update),
            parsed_args.tags,
            skip_tags,
            verbosity,
            workdir=ansible_dir,
            priv_key=key)

        playbooks = (constants.MAJOR_UPGRADE_PLAYBOOKS
                     if playbook == 'all' else playbook)
        self.log.info(("Completed Overcloud Upgrade Run for {0} with "
                       "playbooks {1} ").format(limit_hosts, playbooks))
    def take_action(self, parsed_args):
        self.log.debug("take_action(%s)" % parsed_args)
        clients = self.app.client_manager
        stack = parsed_args.stack

        # Run ansible:
        roles = parsed_args.roles
        nodes = parsed_args.nodes
        limit_hosts = roles or nodes
        playbook = parsed_args.playbook
        inventory = oooutils.get_tripleo_ansible_inventory(
            parsed_args.static_inventory, parsed_args.ssh_user, stack)
        skip_tags = self._validate_skip_tags(parsed_args.skip_tags)
        oooutils.run_update_ansible_action(self.log, clients, limit_hosts,
                                           inventory, playbook,
                                           constants.UPGRADE_QUEUE,
                                           constants.MAJOR_UPGRADE_PLAYBOOKS,
                                           package_update,
                                           parsed_args.ssh_user, skip_tags)

        playbooks = (constants.MAJOR_UPGRADE_PLAYBOOKS
                     if playbook == 'all' else playbook)
        self.log.info(("Completed Overcloud Upgrade Run for {0} with "
                       "playbooks {1} ").format(limit_hosts, playbooks))