Hi Fabio, thanks for you answer, I'll give it a try. However, I managed to get the desired behaviour just setting hosts value as a var, like
hosts: {{ host_to_check }} and passing the desired host in extra_vars like { "extra_vars": { "host_to_check": "my host.local" } } This wasn't working before until I flagged the prompt checkbox for extra_vars in template. Thanks! Il Mar 1 Ott 2019, 20:00 Fabio Maia <fabio.hi...@gmail.com> ha scritto: > Hi, > > You may be able to pass host.local as parameters within content to enable > an API using "limit" > > { > "name": "", > "description": "", > "job_type": "run", > "inventory": null, > "project": null, > "playbook": "", > "scm_branch": "", > "forks": 0, > *"limit": "",* > "verbosity": 0, > "extra_vars": "", > "job_tags": "", > "force_handlers": false, > "skip_tags": "", > "start_at_task": "", > "timeout": 0, > "use_fact_cache": false, > "host_config_key": "", > "ask_scm_branch_on_launch": false, > "ask_diff_mode_on_launch": false, > "ask_variables_on_launch": false, > "ask_limit_on_launch": false, > "ask_tags_on_launch": false, > "ask_skip_tags_on_launch": false, > "ask_job_type_on_launch": false, > "ask_verbosity_on_launch": false, > "ask_inventory_on_launch": false, > "ask_credential_on_launch": false, > "survey_enabled": false, > "become_enabled": false, > "diff_mode": false, > "allow_simultaneous": false, > "custom_virtualenv": null, > "job_slice_count": 1 > } > > > > Em terça-feira, 1 de outubro de 2019 11:00:56 UTC-3, MrAquilinux escreveu: >> >> Oi pessoal, Eu não sei se isso é realmente possível ou posso usar tower / >> awx para isso. >> De qualquer forma, gostaria de configurar um gatilho no meu sistema de >> monitoramento que, se o gatilho for disparado em um host específico, inicie >> um modelo / trabalho / manual nesse host. >> >> Por exemplo, um acionador para "pouco espaço em disco" é acionado para o >> host *myhost.local* no meu software de monitoramento. >> O gatilho gera uma ação que chamará via API REST um modelo no meu >> servidor em torre, ou seja. um POST para http: //tower.local/job_ templates >> / 13 / launch / <http://tower.local/job_templates/13/launch/> . >> >> Agora, o trabalho será lançado para o inventário associado ao modelo >> htat, mas eu gostaria que o trabalho fosse executado apenas em >> *myhost.local.* >> >> Eu sei que posso passar um *ID de inventário* via API REST, mas >> realmente gostaria de passar apenas um *host* . >> >> Como eu posso fazer isso? Isso faz sentido? >> *Preciso* : criar um inventário contendo *myhost.local -> * obter esse *ID >> do inventário -> * passar o *ID* do *inventário* via POST ao iniciar o >> modelo -> excluir o inventário? >> >> Obrigado! >> >> >> >> -- > 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 ansible-project+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/1c0bafbb-60ca-4875-9d00-f9df0c1ee7f9%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/1c0bafbb-60ca-4875-9d00-f9df0c1ee7f9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALXBZa8hMmmaA5M3KAb6ApY-e6CENkSi1o4HLiCfWUYEaF12-A%40mail.gmail.com.