REmote script does not run on some hosts

6 views
Skip to first unread message

Pooja

unread,
Apr 15, 2020, 4:11:06 AM4/15/20
to Ansible Project
Hello , 

I am new to Ansible and not sure if am doing anything wrong. I have an ansible playbook to start the cassandra process. I see that the remote init script runs perfectly on some hosts and does not on other. The script just does not start the process nor does print any error. Help me out if am missing anything.

Playbook:

---
  hosts: [myhosts]
  serial: 1
  become: yes

  tasks:

  - name: start Cassandra
    shell: /etc/init.d/cassandra start
    async: true
    poll: 0

  - name: Wait for Cassandra to start
    wait_for:
     host: "{{ansible_default_ipv4.address}}"
     port: 9042
     
Reply all
Reply to author
Forward
0 new messages