diff --git a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py index a8bdd1e5b5..32c9cf817f 100644 --- a/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py +++ b/lib/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py @@ -168,7 +168,7 @@ EXAMPLES = ''' - name: Add Credential Into Tower tower_credential: name: Workshop Credential - ssh_key_data: "/home/{{ansible_user}}/.ssh/aws-private.pem" + ssh_key_data: "{{ lookup('file', '/home/' ~ {{ansible_user}} ~ '/.ssh/aws-private.pem') }}" kind: ssh organization: Default tower_username: admin