summaryrefslogtreecommitdiff
path: root/test/integration/targets/systemd
diff options
context:
space:
mode:
authorLorenzo Castelli <lcastelli@google.com>2020-08-17 09:09:07 -0700
committerGitHub <noreply@github.com>2020-08-17 12:09:07 -0400
commita1a50bb3cd0c2d6f2f4cb260a43553c23e806d8a (patch)
tree93a5ce15ed3767c2862908866761b59f60003325 /test/integration/targets/systemd
parent5821128995097831f3dd31fca80546c5d6392e66 (diff)
downloadansible-a1a50bb3cd0c2d6f2f4cb260a43553c23e806d8a.tar.gz
systemd - supports new systemctl output message for chroot (#71197)
The message generated by systemctl has been updated in https://github.com/systemd/systemd/commit/9321e23c40f3dc6bd785105ce882cbad6447a1c6, which requires a corresponding change in the systemd module. In addition, this fixes the module when the SYSTEMD_OFFLINE environment variable is set.
Diffstat (limited to 'test/integration/targets/systemd')
-rw-r--r--test/integration/targets/systemd/tasks/main.yml7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/integration/targets/systemd/tasks/main.yml b/test/integration/targets/systemd/tasks/main.yml
index 282988b356..1d98da8db7 100644
--- a/test/integration/targets/systemd/tasks/main.yml
+++ b/test/integration/targets/systemd/tasks/main.yml
@@ -72,4 +72,11 @@
- result is failed
- result is search("Could not find the requested service {{ fake_service }}")
+ - name: check that the module works even when systemd is offline (eg in chroot)
+ systemd:
+ name: "{{ running_names.stdout_lines|random }}"
+ state: started
+ environment:
+ SYSTEMD_OFFLINE: 1
+
when: 'systemctl_check.rc == 0'