diff --git a/defaults/main.yml b/defaults/main.yml index 5b79433..0365306 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,6 +8,5 @@ theo_agent_cache_dir: /var/cache/theo-agent theo_agent_verify_signature: false theo_agent_public_key: "" theo_agent_public_key_path: "{{ theo_agent_config_dir }}/public.pem" -theo_agent_sshd_authorized_keys_command: "{{ theo_agent_path }}" theo_agent_hostname_prefix: "" theo_agent_hostname_suffix: "" diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml index c26b078..0cc80bf 100644 --- a/molecule/default/playbook.yml +++ b/molecule/default/playbook.yml @@ -31,3 +31,11 @@ roles: - role: ansible-theo-agent + +- name: Converge again + hosts: all + vars: + - theo_url: https://theo.example.com + - theo_client_token: zdOPNza4jjtceH5F2rU0iOkIJ2xlV4hGUauKT4cNe8HAp+AMnzYEzSc0EIBGM+MJuqL7gLd6bwIP + roles: + - role: ansible-theo-agent diff --git a/tasks/sshd.yml b/tasks/sshd.yml index 294e361..c275f5d 100644 --- a/tasks/sshd.yml +++ b/tasks/sshd.yml @@ -6,6 +6,10 @@ sshd_current_version is version('6.4', '>=') msg: With OpenSSH < 6.4 theo_agent_config_path must be /etc/theo-agent/config.yml +- name: Set AuthorizedKeysCommand + set_fact: + theo_agent_sshd_authorized_keys_command: "{{ theo_agent_path }}" + - name: Set AuthorizedKeysCommand config snippet 1 set_fact: theo_agent_sshd_authorized_keys_command: "{{ theo_agent_sshd_authorized_keys_command }} -config-file {{ theo_agent_config_path }}"