Edit this page on GitHub

Home > docs > getting started > Node Roster

Node Roster

Node Roster is an optional feature of Concord. It collects Ansible deployment data which is exposed via the API and a flow task.

Node Roster requires a minimum Ansible Plugin version of 1.38.0. No further configuration is required for usage.

Features

  • automatically processes Ansible events and collects deployment data such as:
  • provides a way to fetch the collected data using API or the nodeRoster task.

Supported Modules

Node Roster supports the following Ansible modules:

Future versions will further extend this list.

Example

A simple example of a flow and a playbook that downloads a remote file and puts it onto the remote host’s directory.

The flow:

# concord.yml
configuration:
  dependencies:
    - "mvn://com.walmartlabs.concord.plugins.basic:ansible-tasks:2.14.0"

flows:
  default:
  - task: ansible
    in:
      playbook: playbook.yml
      inventory:
        myHosts:
          hosts:
            - "myhost.example.com"
          vars:
            ansible_connection: "local" # just for example purposes, don't actually connect
      extraVars:
        artifactDest: "${workDir}"

The playbook:

# playbook.yml
---
- hosts: myHosts
  tasks:
  - get_url:
      url: "http://central.maven.org/maven2/com/walmartlabs/concord/concord-cli/2.14.0/concord-cli-2.14.0-executable.jar"
      dest: "{{ artifactDest }}"

To run the example, either put it into a Git repository and follow the Quick Start guide or start it using curl (in the directory with concord.yml and playbook.yml):

$ curl -i -u CONCORD_USER \
-F [email protected] \
-F [email protected] \
https://concord.example.com/api/v1/process 

Open the Concord UI to check the process status. After the process finishes, try one of the Node Roster endpoints:

$ curl -i -u CONCORD_USER https://concord.example.com/api/v1/noderoster/artifacts?hostName=myhost.example.com
HTTP/1.1 200 OK
...
[ {
  "url" : "http://central.maven.org/maven2/com/walmartlabs/concord/concord-cli/2.14.0/concord-cli-2.14.0-executable.jar"
} ]

The API endpoint in the example returns a list of artifacts that were deployed to the specified host. Check the API documentation for the complete list of endpoints.