blob: c9cb75645ef626e43e93dc80d63e69ab13219ff4 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Zack Williamsc989f262017-05-11 13:02:59 -070017---
18# ssh-install-maas/tasks/main.yml
19
20# the following replicates the functionality of the maas repo `prep` role
21# users/perms may seem off, but is identical to that role
22
23- name: Create ssh key directory for MaaS
Zack Williamsfe284a12017-07-01 11:00:04 -070024 when: use_maas
Zack Williamsc989f262017-05-11 13:02:59 -070025 file:
26 dest: "/etc/maas/.ssh/"
27 mode: 0755
28 owner: "root"
29 group: "root"
30 state: directory
31
32- name: Copy ssh private key for MaaS
Zack Williamsfe284a12017-07-01 11:00:04 -070033 when: use_maas
Zack Williamsc989f262017-05-11 13:02:59 -070034 copy:
35 src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey"
36 dest: "/etc/maas/.ssh/cord_rsa"
37 mode: 0644
38 owner: "root"
39 group: "root"
40 backup: true
41
42- name: Copy ssh public key for MaaS
Zack Williamsfe284a12017-07-01 11:00:04 -070043 when: use_maas
Zack Williamsc989f262017-05-11 13:02:59 -070044 copy:
45 src: "{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey.pub"
46 dest: "/etc/maas/.ssh/cord_rsa.pub"
47 mode: 0644
48 owner: "root"
49 group: "root"
50 backup: true
51