move changed_when to tasks instead of block
This commit is contained in:
parent
76f0635074
commit
8b23b1b3d5
@ -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
|
||||
changed_when: False
|
||||
become: True
|
||||
changed_when: False
|
||||
|
||||
- name: Create admin user
|
||||
mongodb_user:
|
||||
@ -33,10 +35,11 @@
|
||||
src: /etc/mongod.conf.bak
|
||||
dest: /etc/mongod.conf
|
||||
remote_src: True
|
||||
changed_when: False
|
||||
|
||||
- name: Restart service
|
||||
service:
|
||||
name: mongod
|
||||
state: restarte
|
||||
changed_when: False
|
||||
changed_when: False
|
||||
become: True
|
||||
|
Loading…
Reference in New Issue
Block a user