Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • How to pass tower credential to create profile on any host

    Posted on

    How do I access credential parameters stored in Ansible Tower within a playbook? (For example: username, password, etc)
    How do I use these variables(username/password) in any host to create profile.

    I tried using below commands to get 'Machine' type credential but didn't worked.

     username: '{{ ansible_user }}'
    

    password: '{{ ansible_password }}'

      username: '{{ lookup("env", "USERNAME") }}'
      password: '{{ lookup("env", "PASSWORD") }}'
    

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat