SSH to localhost for functional tests
There is an open review for project-config to enable this by default, until then, we can have ansible set things up for us. Change-Id: I64aaa7187568ff08ef6b0935d8829376dd6761e5 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
f83b589c3b
commit
1360549636
|
@ -1,2 +1,2 @@
|
||||||
[all]
|
[all]
|
||||||
localhost ansible_connection=local
|
localhost
|
||||||
|
|
|
@ -12,6 +12,21 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
---
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
gather_facts: no
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
# Setup SSH to localhost
|
||||||
|
- name: Generate SSH keys.
|
||||||
|
shell: ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -P ""
|
||||||
|
delegate_to: localhost
|
||||||
|
- name: Setup authorized_keys
|
||||||
|
shell: cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
||||||
|
delegate_to: localhost
|
||||||
|
- name: keyscan
|
||||||
|
shell: ssh-keyscan -H localhost >> ~/.ssh/known_hosts
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
sudo: yes
|
sudo: yes
|
||||||
vars:
|
vars:
|
||||||
|
|
Loading…
Reference in New Issue