pipeline { agent { label "master" } stages { stage("ping") { steps { writeFile file: 'main.yml', text: ''' --- - hosts: all tasks: - ping: ''' sh (["ansible-playbook", "--limit", "'majordomo:!router-miran1.intr:!vpn-dh.majordomo.ru:!router4.intr!:!deprecated'", "main.yml"].join(" ")) } } } }