我无法配置与ansible的rundeck集成,我使用的是rundeck-ansible插件,但我无法从google获得简单和有用的信息/帮助。我已经在同一台服务器上安装了ansible和rundeck。我已经使用过该插件https://github.com/Batix/rundeck-ansible-plugin,但无法对其进行配置。有没有人可以一步一步的分享这个链接。任何帮助都将不胜感激。
发布于 2020-02-02 02:05:36
请记住,Ansible plugin是开箱即用的运行平台社区和企业版,这两种解决方案必须共存于同一服务器/主机中才能正常工作。因此,基本上,您需要遵循以下步骤:
1-配置Ansible model source。点击“项目设置”,点击“编辑节点...”然后点击"Add new Node Source +“绿色按钮。拿一个look。Choose "Ansible Resource Model Source“和define你的Ansible清单文件路径(通常在/etc/ansible/hosts)和Ansible配置路径(通常在/etc/ansible/ansible.cfg)。在"SSH connection“部分,您将提供用于访问库存主机的SSH用户和身份验证方法(for example,您可以使用"rundeck”用户私钥来访问您的库存节点),然后向下滚动并单击“保存”绿色按钮。
现在,如果您单击左侧面板上的" nodes“链接,请对Ansible清单中定义的节点执行you can see操作。此外,您还可以添加另一个模型源来使用您的攻略。
2-是时候进行快速测试了,转到左侧面板中的Commands选项,在Nodes部分,然后选择Ansible清单中定义的一些Ansible节点,并运行一些命令,在示例中,我使用了ls -a,take a look。
3- Now you can run any命令/playbook/inline-playbook覆盖ansible节点。
我将一个作业定义示例(带有一个基本的内联脚本脚本)分发给一个清单主机:
- defaultTab: nodes
description: ''
executionEnabled: true
id: 9cbbdb03-9335-4307-b766-de1f17d81f93
loglevel: INFO
name: Ansible Inline Playboook Example
nodeFilterEditable: false
nodefilters:
dispatch:
excludePrecedence: true
keepgoing: false
rankOrder: ascending
successOnEmptyNodeFilter: false
threadcount: '1'
filter: 'name: 192.168.33.20'
nodesSelectedByDefault: true
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- configuration:
ansible-base-dir-path: /etc/ansible
ansible-become: 'false'
ansible-playbook-inline: |-
---
- hosts: all
user: vagrant
tasks:
- name: uptime
command: 'uptime'
register: output
- debug: var=output.stdout_lines
ansible-ssh-passphrase-option: option.password
ansible-ssh-use-agent: 'false'
nodeStep: true
type: com.batix.rundeck.plugins.AnsiblePlaybookInlineWorkflowNodeStep
keepgoing: false
strategy: node-first
uuid: 9cbbdb03-9335-4307-b766-de1f17d81f93您可以观看this视频,了解有关在Rundeck上运行Ansible playbooks (和使用内联Ansible playbooks)的更多信息。
https://stackoverflow.com/questions/60011639
复制相似问题