官术网_书友最值得收藏!

Setting up Rundeck

The following Ansible playbook will set up Rundeck on the Ubuntu 16.04 OS.  It also adds the Rundeck service to start up the process:

- name: installing rundeck on ubuntu 16.04
  hosts: "192.168.1.7"
  remote_user: ubuntu
  gather_facts: False
  become: True

  tasks:
    - name: installing python2 minimal
      raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)

    - name: java and curl installation
      apt:
name: "{{ item }}"
state: present
update_cache: yes
with_items: - curl - openjdk-8-jdk - name: downloading and installing rundeck deb package apt: deb: "http://dl.bintray.com/rundeck/rundeck-deb/rundeck-2.8.4-1-GA.deb" - name: add to startup and start rundeck service: name: rundeckd state: started

To set up Rundeck, run the following command. Where 192.168.1.7 is the server IP address where Rundeck will install:

ansible-playbook -i '192.168.1.7,' site.yml --ask-sudo-pass

Once it is successfully executed, navigate the browser to http://192.168.1.7:4440 and you can see the login panel for the Rundeck application. The default username and password to log in to Rundeck is admin:

Now we can create a new project to start working on. Provide a new Project Name and go with the default settings for now:

Now, we can add multiple hosts into Rundeck to perform multiple actions. The following screenshot shows an example of running the  uname -a command across multiple nodes, which matches osArch: amd64, we can also create filters for different use cases:

Using Rundeck, we can also schedule jobs to run at certain times and store the output in different formats. Rundeck also provides a REST API that can be integrated into the existing tool set.

主站蜘蛛池模板: 兴安县| 濮阳市| 屯昌县| 泗阳县| 兴义市| 安达市| 莱芜市| 江都市| 莱西市| 昌宁县| 绿春县| 高陵县| 阳西县| 蕉岭县| 河源市| 云浮市| 永兴县| 南川市| 湖南省| 赣州市| 文成县| 呼图壁县| 阜阳市| 舒兰市| 叙永县| 和田县| 甘南县| 建昌县| 洛隆县| 遂昌县| 梁河县| 扶余县| 古丈县| 黔南| 常德市| 毕节市| 抚远县| 那坡县| 繁峙县| 丹棱县| 库尔勒市|