Browse Source

rename id_rsa into infrastructure_key

keep-around/75c88b35a4c2644dee1419d0b8bc325a3b09a00f
singuliere 3 years ago
parent
commit
8bb6c9cfa7
No known key found for this signature in database GPG Key ID: 900857755EF189C2
  1. 2
      bootstrap
  2. 2
      enough/common/bind.py
  3. 0
      infrastructure_key
  4. 0
      infrastructure_key.pub
  5. 2
      inventories/common/group_vars/all/private-key.yml
  6. 4
      molecule/api/roles/api/tasks/api.yml
  7. 2
      molecule/bind/tests/test_testing_zone.py

2
bootstrap

@ -4,4 +4,4 @@ sudo apt-get install curl virtualenv python3 gcc libffi-dev libssl-dev python3-d
virtualenv --python=python3 ../virtualenv
source ../virtualenv/bin/activate
pip install -r requirements.txt
chmod 600 id_rsa # cannot be stored in git
chmod 600 infrastructure_key # cannot be stored in git

2
enough/common/bind.py

@ -49,7 +49,7 @@ def nsupdate(data, state):
r = ansible_utils.run(
'ansible',
'-i', f'{bind_host},',
'--private-key', f'{basedir}/id_rsa',
'--private-key', f'{configdir}/infrastructure_key',
'--user=debian',
bind_host,
'--one-line',

0
id_rsa → infrastructure_key

0
id_rsa.pub → infrastructure_key.pub

2
inventories/common/group_vars/all/private-key.yml

@ -1,2 +1,2 @@
---
ssh_private_keyfile: "{{ lookup('pipe', 'git rev-parse --show-toplevel') }}/id_rsa"
ssh_private_keyfile: "{{ lookup('pipe', 'git rev-parse --show-toplevel') }}/infrastructure_key"

4
molecule/api/roles/api/tasks/api.yml

@ -52,11 +52,11 @@
path: "/root/.enough/{{ domain }}"
state: directory
- name: cp /etc/ssh/ssh_host_rsa_key ~/.enough/{{ domain }}/id_rsa
- name: cp /etc/ssh/ssh_host_rsa_key ~/.enough/{{ domain }}/infrastructure_key
copy:
remote_src: yes
src: /etc/ssh/ssh_host_rsa_key
dest: "/root/.enough/{{ domain }}/id_rsa"
dest: "/root/.enough/{{ domain }}/infrastructure_key"
owner: "{{ ansible_user }}"
mode: 0444

2
molecule/bind/tests/test_testing_zone.py

@ -69,7 +69,7 @@ def test_subdomain_creation(host):
other_bind_address = '1.2.3.4'
localhost = host.get_host('ansible://localhost',
ansible_inventory=host.backend.ansible_inventory)
cmd = localhost.run('ssh -i ../../id_rsa '
cmd = localhost.run('ssh -i ../../infrastructure_key '
'-o BatchMode=yes -o StrictHostKeyChecking=no '
'subdomain@{address} {ns_ip} subsubdomain.test.{test_domain}'.format(
ns_ip=other_bind_address,

Loading…
Cancel
Save