move changed_when to tasks instead of block

This commit is contained in:
Robert Kaussow 2018-07-07 18:55:41 +02:00
parent 76f0635074
commit 8b23b1b3d5

View File

@ -5,19 +5,21 @@
src: /etc/mongod.conf
dest: /etc/mongod.conf.bak
remote_src: True
changed_when: False
- name: Deploy config file without auth
template:
src: etc/mongod_init.conf.j2
dest: /etc/mongod.conf
mode: 0644
changed_when: False
- name: Restart service
service:
name: mongod
state: restarte
become: True
changed_when: False
become: True
- name: Create admin user
mongodb_user:
@ -33,6 +35,7 @@
src: /etc/mongod.conf.bak
dest: /etc/mongod.conf
remote_src: True
changed_when: False
- name: Restart service
service: