Forge Home

mcollective_agent_filemgr

File Manager

318,135 downloads

999 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.1.0 (latest)
  • 2.0.3
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.1.0
released Feb 3rd 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
  • Puppet >= 6.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'choria-mcollective_agent_filemgr', '2.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add choria-mcollective_agent_filemgr
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install choria-mcollective_agent_filemgr --version 2.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

choria/mcollective_agent_filemgr — version 2.0.2 Feb 3rd 2024

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.