简体   繁体   English

用户在 Rundeck 中运行计划作业

[英]User running a scheduled job in Rundeck

Is there a way to force all scheduled job runs to be performed by a certain user, instead of the user which enabled the scheduling?有没有办法强制所有计划的作业运行由某个用户执行,而不是由启用计划的用户执行?

What I meant is the rundeck user, not the node user, like those defined in the realm.properties file.我的意思是 rundeck 用户,而不是像在 realm.properties 文件中定义的那些节点用户。

Let's say I have 2 users defined: user1 and user2.假设我定义了 2 个用户:user1 和 user2。 user1 logs into rundeck and starts a job. user1 登录 rundeck 并开始工作。 In the recent executions list the job will appear as performed "by user1".在最近的执行列表中,作业将显示为“由用户 1”执行。

user1 now edits the job and enables the "Schedule to run repeatedly" option. user1 现在编辑作业并启用“计划重复运行”选项。 When the job starts on the schedule it will also be reported as ran "by user1".当作业按计划启动时,它也将报告为“由用户 1”运行。

What I need is a way to tell rundeck that all jobs which have "Schedule to run repeatedly" enabled should be run by another user (such as user2) instead of the user that edited them and enabled the scheduling (user1).我需要的是一种方法来告诉 rundeck,所有启用了“重复运行计划”的作业都应该由另一个用户(例如 user2)而不是编辑它们并启用计划的用户(user1)运行。

Why do I want this?我为什么要这个? Two reasons:两个原因:

1. Cleanliness: I want all automated jobs to be listed as ran by a "rundeck service" user. 1. 清洁度:我希望所有自动化作业都被列为由“rundeck 服务”用户运行。

2. Issues with LDAP and ACLs: our rundeck users are imported from LDAP and rundeck ACLs are set for LDAP groups. 2. LDAP 和 ACL 的问题:我们的 rundeck 用户是从 LDAP 导入的,并且为 LDAP 组设置了 rundeck ACL。 When a job is run on schedule rundeck will not call the LDAP server to retrieve the group list, the user will then be treated as having no group and consequently no ACL and the job will fail because of lack of permissions.当作业按计划运行时,rundeck 不会调用 LDAP 服务器来检索组列表,用户将被视为没有组,因此没有 ACL,作业将因缺乏权限而失败。

是的,您可以通过该节点定义的username属性指定不同的帐户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM