From 0606140dbbf7628ff2f9e23d4d8da8fdc071814d Mon Sep 17 00:00:00 2001 From: Andrea Cimbalo Date: Sat, 8 Apr 2017 18:56:09 +0200 Subject: [PATCH] ssh_server can now run on openwrt --- firewall.yaml | 1 + roles/ssh_server/tasks/main.yaml | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/firewall.yaml b/firewall.yaml index c7d82cb..b781e66 100644 --- a/firewall.yaml +++ b/firewall.yaml @@ -3,3 +3,4 @@ roles: - role: openvpn - role: ssh_server + ansible_distribution: "openwrt" diff --git a/roles/ssh_server/tasks/main.yaml b/roles/ssh_server/tasks/main.yaml index f7f4211..305f051 100644 --- a/roles/ssh_server/tasks/main.yaml +++ b/roles/ssh_server/tasks/main.yaml @@ -24,18 +24,13 @@ var: vm_public_key['content'] verbosity: 2 - - name: read hostname - shell: /bin/hostname - register: hostname_result - changed_when: false - - name: generate host request set_fact: cert_request: type: 'sign_request' request: keyType: 'ssh_host' - hostName: '{{ hostname_result.stdout }}.lilik.it' + hostName: '{{ ansible_docker_extra_args | default(ansible_hostname) }}.lilik.it' keyData: "{{ vm_public_key['content'] | b64decode | replace('\n', '')}}" - debug: