summaryrefslogtreecommitdiff
path: root/Jenkinsfile
blob: 63715c9130d9cd84ce67e3a0ba68b6c6b887a0f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
pipeline {
    agent {
        label "master"
    }
    environment {
        ANSIBLE_STDOUT_CALLBACK = "actionable"
    }
    stages {
        stage("Fetch data") {
            steps {
                sh (["ansible",
                     "--limit", "'majordomo:!router-miran1.intr:!vpn-dh.majordomo.ru'"
                     , "-m", "setup",
                     "--tree", "/home/oleg/ansible-out/out",
                     "majordomo"].join(" "))
            }
        }
        stage("Generate reports") {
            steps {
                dir("/home/oleg/ansible-out") {
                    sh "env PATH=/home/oleg/bin:$PATH /home/oleg/.local/bin/ansible-cmdb -t html_fancy_split -p local_js=1 /home/oleg/ansible-out/out"
                }
            }
        }
    }
}