ansible script is failing when useing prompts

38 views
Skip to first unread message

pavan kumar

unread,
Aug 26, 2020, 12:00:27 PM8/26/20
to Ansible Project

' I am new to ansible, I am having issue when executing my ansible playbook. My playbook just run a deploy-release script in destination. This deploy script ask to enter a version to deploy so I am using ansible prompt to input the release version that I need. But it is not working. However if I run the deployrelease script from my destination server directly it is working fine.

I am using below ansible-playbook to run. Please help me.

hosts: all

 become: true

 gather_facts: no

 vars_prompt:

         - name: "release_version"

           prompt: "Please select the release to deploy"

           default: "1"

           private: no

 tasks:

  - name: Deploying Model

     become_user: yes

     shell: source /home/pavan/.bashrc && ./deploy-release -model

     args:

        executable: /bin/bash

        chdir: /home/pavan/deployments/project/cmd


   - name: Deploying Platform 

     become_user: yes

     shell: /home/pavan/.bashrc && ./deploy-release -platform

     args:

        executable: /bin/bash

        chdir: /home/pavan/deployments/project/cmd`


thank you,

Pavan



Reply all
Reply to author
Forward
0 new messages