Added changed_when for several tasks

This commit is contained in:
Sergei Antipov 2015-06-16 14:19:58 +06:00
parent aa3a8bf574
commit 11c4200f5e
2 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,7 @@
- name: get pid of mongod
command: pidof mongod
register: mongod_pid
changed_when: false
ignore_errors: True
- name: temporary start mongod if not started
@ -87,6 +88,7 @@
- name: get pid of mongod
command: pidof mongod
register: mongod_new_pid
changed_when: false
when: mongod_pid.rc != 0
- name: kill temporary mongod if started

View File

@ -5,6 +5,7 @@
- name: Check if running on systemd
command: cat /proc/1/cmdline
register: systemd
changed_when: false
- name: Add systemd configuration if present
copy: src=mongodb.service dest=/lib/systemd/system/mongodb.service owner=root group=root mode=0640