Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] missing state win_task #59037

Closed
aarnaud opened this issue Nov 27, 2020 · 7 comments
Closed

[FEATURE REQUEST] missing state win_task #59037

aarnaud opened this issue Nov 27, 2020 · 7 comments
Assignees
Labels
Feature new functionality including changes to functionality and code refactors, etc. State-Module

Comments

@aarnaud
Copy link
Contributor

aarnaud commented Nov 27, 2020

Is your feature request related to a problem? Please describe.
A module win_task exist but there is no state to call it.

Describe the solution you'd like
A simple state that call that module

Additional context
This module permit to manage windows schedule tasks.

Exemple of small state that I can used:

def __virtual__():
    '''
    Only load if the graylog module is available
    '''
    if 'task.create_task_from_xml' in __salt__:
        return 'task'
    return False


def create_folder(name, **client_args):
    ret = {"name": name, "result": True, "changes": {}, "comment": ""}

    ret['comment'] = __salt__['task.create_folder'](name, **client_args)
    if isinstance(ret['comment'], bool) and ret['comment']:
        ret['changes'][name] = "created"

    return ret


def create_task_from_xml(name, **client_args):
    ret = {'name': name, 'result': True, 'changes': {}, 'comment': ""}

    ret['comment'] = __salt__['task.create_task_from_xml'](name, **client_args)

    if isinstance(ret['comment'], bool) and ret['comment']:
        ret['changes'][name] = "created"

    return ret


def delete_task(name, **client_args):
    ret = {'name': name, 'result': True, 'changes': {}, 'comment': ""}

    ret['comment'] = __salt__['task.delete_task'](name, **client_args)

    if isinstance(ret['comment'], bool) and ret['comment']:
        ret['changes'][name] = "deleted"

    return ret
@aarnaud aarnaud added the Feature new functionality including changes to functionality and code refactors, etc. label Nov 27, 2020
@s0undt3ch
Copy link
Collaborator

/cc @twangboy @cmcmarrow since they have more Windows knowledge than me

@rvandegrift
Copy link
Contributor

There is an accepted PR for the state here: #53035
It was merged into https://github.com/saltstack/salt/tree/develop and appears to never have been released.

@sagetherage sagetherage added this to the Approved milestone Feb 16, 2021
@sagetherage
Copy link
Contributor

or does it need to be ported to the master branch? @twangboy

@keslerm
Copy link
Contributor

keslerm commented Nov 11, 2021

this would be very helpful to have

@Danduriel
Copy link

I would love to have this in master.
Anything I can do to help get this merged?

@DaAwesomeP
Copy link
Contributor

Ping, does this require someone submitting a cherry-picked PR between the two branches?

@twangboy twangboy modified the milestones: Approved, Chlorine v3007.0 Mar 29, 2023
@Ch3LL Ch3LL assigned Ch3LL and unassigned twangboy May 24, 2023
@emnavarro02
Copy link

I agree, this is a very useful feature. Any chance of having this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. State-Module
Projects
Status: Done
Development

No branches or pull requests

10 participants