--- - name: Provision PVE Managed Hosts hosts: all become: yes gather_facts: yes # --------------------------------------------- # # INLINE VARIABLES # --------------------------------------------- # vars: # register rhel systems by default __rhsm_register : yes # update environment to latest packages __update_hosts : yes # roles to include __include_roles: - jchristianh.lab_setup.ssh_keypair - jchristianh.lab_setup.set_hostname - jchristianh.lab_setup.deploy_etc_hosts - jchristianh.lab_setup.bashrc - jchristianh.lab_setup.rhsm # this role includes a vault; use # --ask-vault-pass when uncommenting - jchristianh.lab_setup.base_pkgs # - jchristianh.lab_setup.ansible_setup - jchristianh.lab_setup.node_exporter # --------------------------------------------- # # TASKS # --------------------------------------------- # tasks: - name: Include required variables for environment include_vars: dir: "vars/{{ __pve_env | default('tower_lab') }}" - name: Include only RHSM role if unregistering set_fact: __include_roles: ['jchristianh.lab_setup.rhsm'] when: - not __rhsm_register|bool - name : Provision environment include_role : name : "{{ lv_provision }}" loop : "{{ __include_roles }}" loop_control : loop_var : lv_provision ...