jenkins 在ansiblePlaybook插件中如何添加多个清单文件

hc2pp10m  于 2023-03-07  发布在  Jenkins
关注(0)|答案(1)|浏览(258)

这是ansible的剧本。我有两个库存文件。我如何在下面的命令中添加这两个?
备份清单文件1备份清单文件1

ansiblePlaybook(
        playbook: 'ansible/playbooks/stop-start.yml',
        inventory: 'ansible-inventory-file1',
        credentialsId: 'test-ssh',
        hostKeyChecking: false,
        extraVars: [
        action: "stop",
        deploy_env: "${Environment}",     
      ],
'''

Can someone help me out please?
klr1opcd

klr1opcd1#

将文件放入目录

shell> tree ansible-inventory/
ansible-inventory/
├── file1
└── file2

0 directories, 2 files

使用此目录

inventory: 'ansible-inventory',

相关问题