You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm trying to write a playbook that performs certain tasks based on the group a hostname is in, I can't get my test playbook to run correctly. The playbook runs, executes the first task for hosts: all (touches the file as expected), then attempts the next two tasks but returns "no hosts found" for group1 and group2. This works absolutely fine from cli using ansible-core on a deb box, but not when using semaphore in the docker container. My inventory (semaphore static inventory) looks like this:
[group1]
host01
[group2]
host02
The basic playbook that I'm trying to get running is this:
hosts: all
tasks:
name: Touch All Hosts
become: true
command: touch /tmp/allhosts.txt
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So I'm trying to write a playbook that performs certain tasks based on the group a hostname is in, I can't get my test playbook to run correctly. The playbook runs, executes the first task for hosts: all (touches the file as expected), then attempts the next two tasks but returns "no hosts found" for group1 and group2. This works absolutely fine from cli using ansible-core on a deb box, but not when using semaphore in the docker container. My inventory (semaphore static inventory) looks like this:
[group1]
host01
[group2]
host02
The basic playbook that I'm trying to get running is this:
tasks:
become: true
command: touch /tmp/allhosts.txt
tasks:
become: true
command: touch /tmp/group1host.txt
tasks:
become: true
command: touch /tmp/group2host.txt
Any help would be appreciated, I'm stumped on this.
Beta Was this translation helpful? Give feedback.
All reactions