Commit 59420ce9 authored by nanahira's avatar nanahira

optimize

parent 05782c4d
......@@ -27,9 +27,10 @@
src: wg-setconf.conf.j2
dest: '/tmp/{{conn.name}}-setconf.conf'
register: 'wg_setconf_result'
when: 'not (not wg_enable_result.changed and wg_conf_result.changed)'
ignore_errors: true
- name: '{{conn.name}}: wg setconf'
become: true
ignore_errors: true
shell: 'wg setconf {{conn.name}} /tmp/{{conn.name}}-setconf.conf'
when: 'wg_setconf_result.changed'
when: 'not (not wg_enable_result.changed and wg_conf_result.changed) and wg_setconf_result.changed'
......@@ -35,8 +35,9 @@
src: wgfrp-setconf.conf.j2
dest: '/tmp/{{conn.name}}-setconf.conf'
register: 'wg_setconf_result'
when: 'not (not wg_enable_result.changed and wg_conf_result.changed)'
- name: '{{conn.name}}: wg setconf'
become: true
ignore_errors: true
shell: 'wg setconf {{conn.name}} /tmp/{{conn.name}}-setconf.conf'
when: 'wg_setconf_result.changed'
when: 'not (not wg_enable_result.changed and wg_conf_result.changed) and wg_setconf_result.changed'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment