summaryrefslogtreecommitdiffstats
path: root/ansible/setup.yml
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-02-19 18:07:02 +0200
committerSamuli Silvius <s.silvius@partner.samsung.com>2019-02-26 19:39:44 +0200
commit6fd567082d827378547d41eb9a83ce41164a4d12 (patch)
treefa4517fbe895fae0bd02485034846e33ed90b17b /ansible/setup.yml
parentf3491548c657ac1c7f7840eb664e923d5d63c751 (diff)
Create setup role
Creating setup role and moving functionality from setup playbook into new role. This will make roles easier to test and make it easier to implement other OS support later. Issue-ID: OOM-1663 Change-Id: If8b93066997c2442c0b94cb2a95fb535d9560b2b Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/setup.yml')
-rw-r--r--ansible/setup.yml28
1 files changed, 4 insertions, 24 deletions
diff --git a/ansible/setup.yml b/ansible/setup.yml
index ec572973..9e4f051d 100644
--- a/ansible/setup.yml
+++ b/ansible/setup.yml
@@ -1,26 +1,6 @@
---
-- hosts: localhost
+- name: Setup nodes for installer
+ hosts: all
gather_facts: false
- tasks:
- - name: "Check and generate key if needed"
- block:
- - stat:
- path: '{{ private_key }}.pub'
- register: p
-
- - command: ssh-keygen -f {{ private_key }} -t rsa -N ''
- when: not p.stat.exists
- vars:
- private_key: /root/.ssh/offline_ssh_key
-
-- hosts: all
- gather_facts: false
- tasks:
- - name: Setup authorized_keys file
- authorized_key:
- user: root
- state: present
- key: "{{ lookup('file', public_key) }}"
- become: true
- vars:
- public_key: /root/.ssh/offline_ssh_key.pub
+ roles:
+ - setup