Outils pour utilisateurs

Outils du site


tech:ansible_-_dry_-_module_defaults

Ansible - DRY - module_defaults

- name: Test AWX create obj
  hosts: localhost
  gather_facts: false

  vars:
    awx_cred:
      controller_host: http://localhost:3000
      controller_username: admin
      controller_password: P@ssw0rd
      # validate_certs: false

  module_defaults:
    awx.awx.credential: "{{ awx_cred }}"
    awx.awx.project: "{{ awx_cred }}"
    awx.awx.inventory: "{{ awx_cred }}"
    awx.awx.inventory_source: "{{ awx_cred }}"
    awx.awx.credential_type: "{{ awx_cred }}"
    awx.awx.execution_environment: "{{ awx_cred }}"
    awx.awx.job_template: "{{ awx_cred }}"
$ ansible_collections/awx/awx/meta/runtime.yml | yq -r '.action_groups | keys[]'
controller
- name: Test AWX create obj
  hosts: localhost
  gather_facts: false

  module_defaults:
    group/awx.awx.controller:
      controller_host: http://localhost:3000
      controller_username: admin
      controller_password: P@ssw0rd
tech/ansible_-_dry_-_module_defaults.txt · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki