0

는 다음과 같은 형태의 방랑 ansible 제공자에 대해 둘 이상의 플레이 북을 실행할 유효/가능하지 :방랑 : ansible의 제공자에 대해 여러 플레이 북

config.vm.define "repo", primary: true do |d| 
    d.vm.hostname = "some.hostname" 
    # Create a private network, which allows host-only access to the machine 
    # using a specific IP. 
    d.vm.network :private_network, ip: "10.10.2.90" 
    d.vm.provision 'ansible' do |ansible| 
     ansible.config_file = 'ansible/ansible.cfg' 
     ansible.playbook = 'ansible/playbook1.yml' 
     ansible.playbook = 'ansible/playbook2.yml' 
     ansible.sudo = true 
     ansible.inventory_path = 'ansible/inventory/site' 
     ansible.host_key_checking = false 
    end 
    end 

답변

2

더는 유효하지 않습니다

당신이 만약 2 개의 게임 플레이 북을 실행하고 싶다면 유능한 제공기를 두 번 실행해야합니다.

config.vm.define "repo", primary: true do |d| 
    d.vm.hostname = "some.hostname" 
    # Create a private network, which allows host-only access to the machine 
    # using a specific IP. 
    d.vm.network :private_network, ip: "10.10.2.90" 

    d.vm.provision "playbook1" type:'ansible' do |ansible| 
     ansible.config_file = 'ansible/ansible.cfg' 
     ansible.playbook = 'ansible/playbook1.yml' 
     ansible.sudo = true 
     ansible.inventory_path = 'ansible/inventory/site' 
     ansible.host_key_checking = false 
    end 

    d.vm.provision "playbook2" type:'ansible' do |ansible| 
     ansible.config_file = 'ansible/ansible.cfg' 
     ansible.playbook = 'ansible/playbook2.yml' 
     ansible.sudo = true 
     ansible.inventory_path = 'ansible/inventory/site' 
     ansible.host_key_checking = false 
    end 
    end