Commit 0c3938e
committed
Fix playbook failure due to invalid escaped character in service restart command
The playbook was failing when attempting to restart OpenStack services
because of an invalid escaped character in the command that lists and
restarts services. The original implementation used a shorthand
systemctl flag (-a) along with a regular expression for egrep, which led
to improper parsing and execution issues during the playbook run.
This commit replaces the shorthand with a more explicit invocation that
is confirmed to run without error:
- Uses "systemctl list-units --type=service --all --no-legend --plain"
to reliably list service units.
- Adds the "-r" flag to xargs to avoid running systemctl restart without
input, ensuring more predictable behavior.
Note: This bug may be specific to hosts running Ubuntu Jammy1 parent 8214ee4 commit 0c3938e
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
76 | 77 | | |
0 commit comments