For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

cwkim's avatar
cwkim
Icon for Nimbostratus rankNimbostratus
Jun 25, 2019

How to move 'vars' config from main.yaml to inventory

Hi

 

I want to move VARS config of main.yaml to inventory file. Not using role.

 

example.

 

=====main.yaml=====

---

 

- name: 02-playbook

  hosts: ltm01

  connection: local

 

  vars:

    provider:

      password: PASSWORD

      server: 123.123.123.123

      user: admin

      validate_certs: no

      server_port: 443

 

  tasks:

    - name: Create a trunk on hardware BIG-IP 01

      bigip_trunk:

        provider: "{{ provider }}"

        name: tr_f34

        interfaces:

          - 1.3

          - 1.4

        link_selection_policy: maximum-bandwidth

        frame_distribution_hash: destination-mac

        lacp_enabled: yes

        lacp_mode: passive

        lacp_timeout: short

      delegate_to: localhost

 

=====inventory=====

[ltm01]

123.123.123.123

 

 

As yoe see above it, I want to move it(marked bold string) from main.yaml to inventory.

No RepliesBe the first to reply