ansible-plugin icon indicating copy to clipboard operation
ansible-plugin copied to clipboard

Rundeck 5.2 Ansible. How to disable -l (--limit) option?

Open alexsalex opened this issue 1 year ago • 3 comments

Have a playbook with multiple hosts, hosts generated automatically.

How to disable -l option in Rundeck 5.2?

alexsalex avatar Jun 03 '24 22:06 alexsalex

You can't disable limit option in rundeck plugin; limit is always generated from supplied host filter, or you can override it in extra arguments. If you have multiple hosts, why not use ansible group? Or otherwise, just use inline playbook.

tanji avatar Jun 20 '24 15:06 tanji

Use case: I create a VM in VMware. To do that I use localhost. But I need to add the record in the DHCP server, log in to the server, and change the config. In this case, which arguments and groups should I use? Please, help.

alexsalex avatar Jun 20 '24 17:06 alexsalex

use case: Provision a host with a cloud provider add it dynamically to the inventory an run commands on it

This flag breaks the use of add_host module. The only workaround is to create a script and call the playbook command instead Inline script is not acceptable, the provision process is very long and under git version control

Can also be reproduced locally (the provisioning commands are omitted and localhost is used)

- name: Install new node
  gather_facts: false
  any_errors_fatal: true
  hosts: localhost
  tasks:
      - add_host:
          name: "test"
          groups: new
          ansible_host: 127.0.0.1
- name: deploy on installed host
  hosts: new
  gather_facts: false
  vars:
    - ansible_ssh_user: root
    - ansible_ssh_pass: passgoeshere
  tasks:
    - ping:

wouter-evolane avatar Nov 04 '24 16:11 wouter-evolane