Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Commit

Permalink
Added peer-interface env variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
roquie committed Jul 26, 2017
1 parent 0d5eb6a commit 8d418eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

ka_master_uri: "ws://127.0.0.1:8080"
ka_token: "secret_token"
ka_peer_interface: "eth1"

ka_config_path: "{{ (ansible_distribution_release == 'xenial') | ternary('/etc/kontena-agent.env', '/etc/default/kontena-agent') }}"
6 changes: 6 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
regexp: "^KONTENA_TOKEN="
line: "KONTENA_TOKEN={{ ka_token }}"

- name: Setup Peer Interface
lineinfile:
path: "{{ ka_config_path }}"
regexp: "^KONTENA_PEER_INTERFACE="
line: "KONTENA_PEER_INTERFACE={{ ka_peer_interface|default('eth1') }}"

- name: Restart Kontena Agent
when: ansible_distribution_release == "xenial"
systemd:
Expand Down

0 comments on commit 8d418eb

Please sign in to comment.