Install ssh key on bridge.openstack.org
We copied this over from puppetmaster, but let's manage it in ansible. The key has been renamed in host_vars on bridge.openstack.org already. Change-Id: Ia102dbe2ae2836880092b8997cb99135f5197b00
This commit is contained in:
parent
18e45a99dd
commit
c4b111691b
@ -191,7 +191,6 @@ node 'puppetmaster.openstack.org' {
|
|||||||
pin_puppet => '3.6.',
|
pin_puppet => '3.6.',
|
||||||
}
|
}
|
||||||
class { 'openstack_project::puppetmaster':
|
class { 'openstack_project::puppetmaster':
|
||||||
root_rsa_key => hiera('puppetmaster_root_rsa_key'),
|
|
||||||
puppetmaster_clouds => hiera('puppetmaster_clouds'),
|
puppetmaster_clouds => hiera('puppetmaster_clouds'),
|
||||||
}
|
}
|
||||||
file { '/etc/openstack/limestone_cacert.pem':
|
file { '/etc/openstack/limestone_cacert.pem':
|
||||||
|
@ -29,19 +29,6 @@ class openstack_project::puppetmaster (
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! defined(File['/root/.ssh']) {
|
|
||||||
file { '/root/.ssh':
|
|
||||||
ensure => directory,
|
|
||||||
mode => '0700',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/root/.ssh/id_rsa':
|
|
||||||
ensure => present,
|
|
||||||
mode => '0400',
|
|
||||||
content => $root_rsa_key,
|
|
||||||
}
|
|
||||||
|
|
||||||
# Cloud credentials are stored in this directory for launch-node.py.
|
# Cloud credentials are stored in this directory for launch-node.py.
|
||||||
file { '/root/ci-launch':
|
file { '/root/ci-launch':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
|
@ -2,3 +2,4 @@
|
|||||||
roles:
|
roles:
|
||||||
- pip3
|
- pip3
|
||||||
- install-ansible
|
- install-ansible
|
||||||
|
- root-keys
|
||||||
|
11
playbooks/roles/root-keys/tasks/main.yaml
Normal file
11
playbooks/roles/root-keys/tasks/main.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- name: Ensure .ssh directory
|
||||||
|
file:
|
||||||
|
path: /root/.ssh
|
||||||
|
mode: 0700
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Write out ssh private key
|
||||||
|
copy:
|
||||||
|
content: '{{ root_rsa_key }}'
|
||||||
|
mode: 0400
|
||||||
|
dest: /root/.ssh/id_rsa
|
Loading…
Reference in New Issue
Block a user