You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- ---
-
- - name: check if systemd lingering is enabled
- stat:
- path: /var/lib/systemd/linger/{{item}}
- register: _users_systemd_linger_stat
- with_items: "{{ users.keys() }}"
-
- - name: set systemd lingering
- command:
- loginctl
- {{ users[item].linger | ternary('enable','disable') }}-linger
- {{item}}
- with_items: "{{ users.keys() }}"
- when:
- - users[item].linger is defined
- - (
- _users_systemd_linger_stat.results
- | json_query("[?item=='"+item+"'].stat.exists") | first
- ) != users[item].linger
|