Address comments to lxc branch and fix several bugs with example-lxc.py

- C.HOST_KEY_CHECKING = False for ansible_playbook.py handler
- mkdir -p {{keys_dir}} added to ssh_key resource run action
This commit is contained in:
Dmitry Shulyak 2015-09-03 12:30:37 +03:00
parent 9287e4d7b7
commit e3417e38dc
2 changed files with 10 additions and 5 deletions

View File

@ -3,10 +3,12 @@
gather_facts: false
# this is default variables, they will be overwritten by resource one
vars:
path: /vagrant/.ssh/id_rsa
keys_dir: /vagrant/.ssh
private_key: /vagrant/.ssh/id_rsa
passphrase: ''
tasks:
- stat: path={{path}}
- shell: mkdir -p {{keys_dir}}
- stat: path={{private_key}}
register: key
- shell: ssh-keygen -t rsa -f {{path}} -N ""
- shell: ssh-keygen -t rsa -f {{private_key}} -N ""
when: key.stat.exists == False

View File

@ -12,10 +12,13 @@ input:
ssh_user:
schema: str!
value:
path:
keys_dir:
schema: str!
value:
pub_path:
private_key:
schema: str!
value:
public_key:
schema: str!
value:
passphrase: