prompt for path
This commit is contained in:
@@ -7,6 +7,7 @@ forks = 20
|
|||||||
callbacks_enabled = timer, profile_tasks, profile_roles
|
callbacks_enabled = timer, profile_tasks, profile_roles
|
||||||
# reduce number of parallel ssh connections to one host
|
# reduce number of parallel ssh connections to one host
|
||||||
pipelining = True
|
pipelining = True
|
||||||
|
interpreter_python = auto_silent
|
||||||
[ssh_connection]
|
[ssh_connection]
|
||||||
ssh_args = -o ControlMaster=auto -o ControlPersist=40s
|
ssh_args = -o ControlMaster=auto -o ControlPersist=40s
|
||||||
# (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)
|
# (boolean) By default Ansible will issue a warning when received from a task action (module or action plugin)
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
- name: update ssh key and login permissions
|
- name: update ssh key and login permissions
|
||||||
strategy: free # dont wait for other hosts when executing
|
strategy: free # dont wait for other hosts when executing
|
||||||
hosts: oracleServer
|
hosts: oracleServer
|
||||||
|
vars_prompt:
|
||||||
|
- name: ssh_key_path
|
||||||
|
prompt: enter the path to the ssh key to add:
|
||||||
|
private: false
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: Add ssh key
|
- name: Add ssh key
|
||||||
@@ -13,7 +17,7 @@
|
|||||||
user: "{{ ansible_user_id }}"
|
user: "{{ ansible_user_id }}"
|
||||||
exclusive: true
|
exclusive: true
|
||||||
state: present
|
state: present
|
||||||
key: "{{ lookup('file', '~/.ssh/id_ed25519.pub') }}"
|
key: "{{ lookup('file', '{{ ssh_key_path }}') }}"
|
||||||
|
|
||||||
- name: sshd configuration file update
|
- name: sshd configuration file update
|
||||||
blockinfile:
|
blockinfile:
|
||||||
|
|||||||
Reference in New Issue
Block a user