Commit c88f17f8 authored by nanahira's avatar nanahira

optimize wg setconf

parent ba4a1a88
......@@ -27,10 +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)'
when: 'not wg_enable_result.changed and not 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: 'not (not wg_enable_result.changed and wg_conf_result.changed) and wg_setconf_result.changed'
when: 'not wg_enable_result.changed and not wg_conf_result.changed and wg_setconf_result.changed'
......@@ -35,9 +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)'
when: 'not wg_enable_result.changed and not 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: 'not (not wg_enable_result.changed and wg_conf_result.changed) and wg_setconf_result.changed'
when: 'not wg_enable_result.changed and not 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