Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

illegal grep flag issue encountered on target system gathering date.machine_id #421

Open
chambridge opened this issue Oct 27, 2017 · 0 comments

Comments

@chambridge
Copy link

Specify type:

  • Bug

Bug severity (if applicable):

  • Low

Description:

The following fact encountered an issues on a target system:

- name: gather date.machine_id fact
  raw: ls --full-time /etc/machine-id | grep -o '[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}'
  register: date_machine_id
  ignore_errors: yes
  when: '"date.machine_id" in facts_to_collect'

Output:
grep: illegal option -- o\r\nUsage: grep -hblcnsviw pattern file . . .


Bug Report

Version of rho:

[ 0.28, 0.29 ]

Expected behavior:

Either better error handling or obtain the date a different way on that machine.

Actual behavior:

Error message stored in the fact.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant