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: