# HG changeset patch # User Luke Hoersten # Date 1589651402 18000 # Node ID d289eab1ea52ee475e84bad6f39129fb8591cdd2 # Parent 8fddefdd948bec181057e8fab01b6943556d93d0 Made transmission idempotent. diff -r 8fddefdd948b -r d289eab1ea52 transmission/tasks/main.yaml --- a/transmission/tasks/main.yaml Sat May 16 10:23:01 2020 -0500 +++ b/transmission/tasks/main.yaml Sat May 16 12:50:02 2020 -0500 @@ -8,6 +8,7 @@ - name: stop transmission service systemd: name="transmission-daemon" state="stopped" daemon_reload="yes" become: yes + changed_when: false - name: config ip whitelist become: yes @@ -33,13 +34,14 @@ line: " \"rpc-port\": {{transmission_port}}," notify: restart transmission service +# the password is hashed at start of server so this always changes - name: config password become: yes lineinfile: path: "{{transmission_config}}" regexp: '^ "rpc-password":' line: " \"rpc-password\": \"{{transmission_passwd}}\"," - notify: restart transmission service + changed_when: false - name: config download dir become: yes @@ -68,3 +70,4 @@ - name: start transmission service systemd: name="transmission-daemon" state="started" daemon_reload="yes" become: yes + changed_when: false