Skip to content

Ansible:ping fails #687

Answered by onedr0p
tomsnj asked this question in Q&A
Apr 5, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I am not sure why this isn't working for you but you can force ansible to try and ping via your user...

https://github.com/onedr0p/flux-cluster-template/blob/main/.taskfiles/AnsibleTasks.yml#L48-L52

Change to something like

  ping:
    desc: Ping all the hosts
    dir: "{{.ANSIBLE_DIR}}"
    cmds:
      - ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -u YOURUSERNAME --one-line -m 'ping'

The user should be picked up from your vars but in your case it is unable to.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tomsnj
Comment options

Answer selected by tomsnj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants