ans2dev.general.udevadm_control module – Reload udev rules.

Note

This module is part of the ans2dev.general collection (version 0.2.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install ans2dev.general. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: ans2dev.general.udevadm_control.

New in ans2dev.general 0.2.0

Synopsis

  • Reload udev rules using udevadm control command.

Requirements

The below requirements are needed on the host that executes this module.

  • udevadm control command with --reload and --log-level options.

Parameters

Parameter

Comments

log_level

string

Set --log-level option value.

Choices:

  • "emerg"

  • "alert"

  • "crit"

  • "err"

  • "warning"

  • "notice"

  • "info"

  • "debug"

Notes

Note

Examples

---
# Reload udev rules
- name: Reload udev rules
  ans2dev.general.udevadm_control:
    log_level: debug
  register: result

# Reload udev rules with debug level
- name: Reload with debug log_level
  ans2dev.general.udevadm_control:
    log_level: debug
  register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

udevcontrol

dictionary

udevadm control output.

Returned: always

stderr

string

udevadm control stderr command.

Returned: always

Sample: ""

stdout

string

udevadm control stdout command.

Returned: always

Sample: ""

Authors

  • Marco Noce (@NomakCooper)