Skip to content

Commit e0e715c

Browse files
committed
Revert legend flag change in Systemd* facts
1 parent 3bdfe14 commit e0e715c

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

pyinfra/facts/systemd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def command(self, user_mode=False, machine=None, user_name=None):
5555
user_name=user_name,
5656
)
5757

58-
return '{0} -al --plain --legend=false list-units'.format(fact_cmd)
58+
return '{0} -al --plain --no-legend list-units'.format(fact_cmd)
5959

6060
def process(self, output):
6161
services = {}
@@ -90,7 +90,7 @@ def command(self, user_mode=False, machine=None, user_name=None):
9090
)
9191

9292
return (
93-
'{0} -al --plain --legend=false --state=loaded list-units | '
93+
'{0} -al --plain --no-legend --state=loaded list-units | '
9494
'while read -r UNIT REST; do '
9595
'STATE=$({0} -P UnitFileState show -- "$UNIT"); '
9696
'if [ -n "$STATE" ]; then '

tests/facts/systemd.SystemdEnabled/machine_services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"arg": [false, "testmachine", "testuser"],
3-
"command": "systemctl --machine=testuser@testmachine -al --plain --legend=false --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl --machine=testuser@testmachine -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
3+
"command": "systemctl --machine=testuser@testmachine -al --plain --no-legend --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl --machine=testuser@testmachine -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
44
"requires_command": "systemctl",
55
"output": [
66
"vboxadd.service enabled",

tests/facts/systemd.SystemdEnabled/root_machine_services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"arg": [false, "testmachine"],
3-
"command": "systemctl --machine=testmachine -al --plain --legend=false --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl --machine=testmachine -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
3+
"command": "systemctl --machine=testmachine -al --plain --no-legend --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl --machine=testmachine -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
44
"requires_command": "systemctl",
55
"output": [
66
"vboxadd.service enabled",

tests/facts/systemd.SystemdEnabled/services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"requires_command": "systemctl",
3-
"command": "systemctl -al --plain --legend=false --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
3+
"command": "systemctl -al --plain --no-legend --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
44
"output": [
55
"vboxadd.service enabled",
66
"vgauth.timer enabled",

tests/facts/systemd.SystemdEnabled/user_machine_services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"arg": [true, "testmachine", "testuser"],
3-
"command": "systemctl --user --machine=testuser@testmachine -al --plain --legend=false --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl --user --machine=testuser@testmachine -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
3+
"command": "systemctl --user --machine=testuser@testmachine -al --plain --no-legend --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl --user --machine=testuser@testmachine -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
44
"requires_command": "systemctl",
55
"output": [
66
"vboxadd.service enabled",

tests/facts/systemd.SystemdEnabled/user_services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"arg": [true],
3-
"command": "systemctl --user -al --plain --legend=false --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl --user -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
3+
"command": "systemctl --user -al --plain --no-legend --state=loaded list-units | while read -r UNIT REST; do STATE=$(systemctl --user -P UnitFileState show -- \"$UNIT\"); if [ -n \"$STATE\" ]; then echo \"$UNIT\" \"$STATE\"; fi; done",
44
"requires_command": "systemctl",
55
"output": [
66
"vboxadd.service enabled",

tests/facts/systemd.SystemdStatus/machine_services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"arg": [false, "testmachine", "testuser"],
3-
"command": "systemctl --machine=testuser@testmachine -al --plain --legend=false list-units",
3+
"command": "systemctl --machine=testuser@testmachine -al --plain --no-legend list-units",
44
"requires_command": "systemctl",
55
"output": [
66
"lvm2-activation.service not-found inactive dead lvm2-activation.service",

tests/facts/systemd.SystemdStatus/root_machine_services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"arg": [false, "testmachine"],
3-
"command": "systemctl --machine=testmachine -al --plain --legend=false list-units",
3+
"command": "systemctl --machine=testmachine -al --plain --no-legend list-units",
44
"requires_command": "systemctl",
55
"output": [
66
"lvm2-activation.service not-found inactive dead lvm2-activation.service",

tests/facts/systemd.SystemdStatus/services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"command": "systemctl -al --plain --legend=false list-units",
2+
"command": "systemctl -al --plain --no-legend list-units",
33
"requires_command": "systemctl",
44
"output": [
55
"lvm2-activation.service not-found inactive dead lvm2-activation.service",

tests/facts/systemd.SystemdStatus/user_machine_services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"arg": ["True", "testmachine", "testuser"],
3-
"command": "systemctl --user --machine=testuser@testmachine -al --plain --legend=false list-units",
3+
"command": "systemctl --user --machine=testuser@testmachine -al --plain --no-legend list-units",
44
"requires_command": "systemctl",
55
"output": [
66
"lvm2-activation.service not-found inactive dead lvm2-activation.service",

0 commit comments

Comments
 (0)