Added changed_when for several tasks
This commit is contained in:
parent
aa3a8bf574
commit
11c4200f5e
|
@ -40,6 +40,7 @@
|
||||||
- name: get pid of mongod
|
- name: get pid of mongod
|
||||||
command: pidof mongod
|
command: pidof mongod
|
||||||
register: mongod_pid
|
register: mongod_pid
|
||||||
|
changed_when: false
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
- name: temporary start mongod if not started
|
- name: temporary start mongod if not started
|
||||||
|
@ -87,6 +88,7 @@
|
||||||
- name: get pid of mongod
|
- name: get pid of mongod
|
||||||
command: pidof mongod
|
command: pidof mongod
|
||||||
register: mongod_new_pid
|
register: mongod_new_pid
|
||||||
|
changed_when: false
|
||||||
when: mongod_pid.rc != 0
|
when: mongod_pid.rc != 0
|
||||||
|
|
||||||
- name: kill temporary mongod if started
|
- name: kill temporary mongod if started
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
- name: Check if running on systemd
|
- name: Check if running on systemd
|
||||||
command: cat /proc/1/cmdline
|
command: cat /proc/1/cmdline
|
||||||
register: systemd
|
register: systemd
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: Add systemd configuration if present
|
- name: Add systemd configuration if present
|
||||||
copy: src=mongodb.service dest=/lib/systemd/system/mongodb.service owner=root group=root mode=0640
|
copy: src=mongodb.service dest=/lib/systemd/system/mongodb.service owner=root group=root mode=0640
|
||||||
|
|
Loading…
Reference in New Issue