Hi,

  We have a use case in which I want to run playbook on specific set of 
machines and same task on spot instances which belongs to same set of 
machines but we dont have entry into host file.

We have cluster of machines (on demand) and some spot instances. I want to 
deploy code to all these machines (on demand + spot instances). So when we 
deploy code we want to deploy to all machines in one playbook run. 

I am using python script to get the public ip of those spot instances.

I am looking a way to run playbook on on demand instances and one 
additional task inside the playbook which will call same playbook 


          role/hadoop/task/release.yml

   ---
    - name: check out project from github
      git: >
         [email protected]:Abc/abc.git
         version=master
         dest=/srv/jobs-prod/abc_hadoop/
         force=yes
         key_file=/root/.ssh/{{ GIT_PRIVATE_KEY }}
      register: git_checkout
      when: branch == master and branch is defined
      run_once: True
      serial: 4
      tags:
        - git_tag


Then I have playbook as following

# Fetches up to date remote branch to local machine

 

  tasks:

      # This task runs on inventry list provided
- include: role/hadoop/task/release.yml

                     

 After this first task is done I want to run same play on spot instance as 
second task in the same playbook. Is there any way to do this ?
 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/43781aef-6570-4592-b540-cd745a957b0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to