Преглед на файлове

some variable naming changes

master
Markus Katharina Brechtel преди 2 години
родител
ревизия
6c99966d62
променени са 4 файла, в които са добавени 6 реда и са изтрити 9 реда
  1. +4
    -2
      defaults/main.yml
  2. +1
    -1
      tasks/local.yml
  3. +1
    -1
      tasks/scan.yml
  4. +0
    -5
      templates/ssh_host_key.j2

+ 4
- 2
defaults/main.yml Целия файл

@@ -1,8 +1,10 @@
ssh_host_key_state: configured

ssh_host: "{{ ansible_host | default(inventory_hostname) }}"

ssh_host_key_types:
- ed25519
- ecdsa
- rsa
ssh_host_key_state: configured
ssh_scan_host: "{% if ssh_ip is defined %}{{ ssh_ip }}{% else %}{{inventory_hostname}}{% endif %}"

ssh_update_local_known_hosts_file: true

+ 1
- 1
tasks/local.yml Целия файл

@@ -5,6 +5,6 @@
args:
path: "{{ lookup('env','HOME') }}/.ssh/known_hosts"
name: "{{ inventory_hostname }}"
key: "{{ lookup('template','ssh_host_key.j2') }}"
key: "{{ inventory_hostname }},{{ ssh_host }} ssh-ed25519 {{ ssh_host_key_ed25519_public }}"
when: ssh_host_key_ed25519_public is defined
throttle: 1

+ 1
- 1
tasks/scan.yml Целия файл

@@ -1,7 +1,7 @@
---

- name: scan ssh host
local_action: command ssh-keyscan -t ed25519 {{ssh_scan_host}}
local_action: command ssh-keyscan -t ed25519 {{ssh_host}}
register: _ssh_keyscan_result
changed_when: false



+ 0
- 5
templates/ssh_host_key.j2 Целия файл

@@ -1,5 +0,0 @@
{% if ssh_ip is defined %}
{{ inventory_hostname }},{{ ssh_ip }} ssh-ed25519 {{ ssh_host_key_ed25519_public }}
{% else %}
{{ inventory_hostname }},{{ ansible_host }} ssh-ed25519 {{ ssh_host_key_ed25519_public }}
{% endif %}

Loading…
Отказ
Запис