Closed ra-beer closed 2 years ago
There are two ways to declare the ansible modules. First way you can write it out like this one:
- name: Configure netbox manufacturers netbox.netbox.netbox_manufacturer: netbox_url: "{{ netbox_url }}" netbox_token: "{{ netbox_token }}" data: name: "{{ item.value.name }}" slug: "{{ item.value.slug }}" description: "{{ item.value.description | default('') }}" state: present with_dict: "{{ netbox_data_manufacturers }}"
Or you can declare the collection like this:
collections: - netbox.netbox tasks: - name: Manage Discworld site netbox_site: netbox_url: "{{ netbox_url }}" netbox_token: "{{ netbox_token }}" validate_certs: false data: name: Discworld slug: discworld state: present
We should declare one way that fits for us. We shouldn´t use both ways.
We wanted to do it as shown in the first example. Please add in the style guide.
We should then also add a custom rule in Ansible Lint to check this in the future. We can do this in a separate issue.
There are two ways to declare the ansible modules. First way you can write it out like this one:
Or you can declare the collection like this:
We should declare one way that fits for us. We shouldn´t use both ways.