mcollective_agent_filemgr

File Manager
Choria Orchestrator

Choria Orchestrator

choria

137,524 downloads

60,245 latest version

2.6 quality score

Version information

  • 2.0.1 (latest)
  • 2.0.0
  • 1.1.0
released Jul 3rd 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.4.x
  • Puppet >= 4.9.0

Start using this module

Documentation

choria/mcollective_agent_filemgr — version 2.0.1 Jul 3rd 2019

Choria File Manager Agent

This agent let you touch files, delete files or retrieve a bunch of stats about a file.

Actions

This agent provides the following actions, for details about each please run mco plugin doc agent/filemgr

  • remove - Removes a file
  • status - Basic information about a file
  • touch - Creates an empty file or touch it's timestamp

Installation

This agent is installed by default as part of the Choria Orchestrator.

Configuration

Actions status, remove and touch have a default file when no file path is given, it defaults to /var/run/mcollective.plugin.filemgr.touch.

To cofigure this create the following Hiera data:

mcollective_agent_filemgr::config:
  touch_file: "/tmp/touchfile"

Usage

To get the status of a file:

% mco rpc filemgr status file=/etc/puppet/puppet.conf
Determining the amount of hosts matching filter for 2 seconds .... 1

 * [ ============================================================> ] 1 / 1


dev1.example.com:
   Modification time: 1289650072
         Change time: Wed Nov 17 00:29:17 +0000 2010
         Change time: 1289953757
                Name: /etc/puppet/puppet.conf
               Owner: 0
         Access time: 1291150379
               Group: 0
                Size: 385
         Access time: Tue Nov 30 20:52:59 +0000 2010
             Present: 1
                Type: file
                Mode: 100644
   Modification time: Sat Nov 13 12:07:52 +0000 2010
                 MD5: 91b8793f2a467aa5d28f6371d3622090
              Status: present


Finished processing 1 / 1 hosts in 71.65 ms

You can similarly touch and remove a file using those named actions.