Using CLI in Ansible
- If you are using SSH keys (including an ssh-agent) you can remove the configuration.
- If you are accessing your host directly (not through a bastion/jump host) you can remove the
ansible_ssh_common_args
configuration. - If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the
ProxyCommand
directive. To prevent secrets from leaking out (for example in ps
output), SSH does not support providing passwords via environment variables.
Example CLI Task
- ironware_config:
- backup: yes
- register: backup_ironware_location