From 1a0184406dd44b353a8b1d4ebfe3ecad8e5a1bba Mon Sep 17 00:00:00 2001 From: Akilan Selvacoumar Date: Fri, 16 Jul 2021 17:27:54 +0400 Subject: [PATCH] added make for test cases --- Makefile | 3 +++ deploy/TestAnsible/description.txt | 1 + deploy/TestAnsible/hosts | 12 ++++++++++++ deploy/TestAnsible/site.yml | 8 ++++++++ plugin/generate_test_case.sh | 2 +- 5 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 deploy/TestAnsible/description.txt create mode 100644 deploy/TestAnsible/hosts create mode 100644 deploy/TestAnsible/site.yml diff --git a/Makefile b/Makefile index a87800f..4bd8a68 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ build: configfile: ./p2prc --SetDefaultConfig +testcases: + sh plugin/generate_test_case.sh + run: go run main.go diff --git a/deploy/TestAnsible/description.txt b/deploy/TestAnsible/description.txt new file mode 100644 index 0000000..b0a0a8f --- /dev/null +++ b/deploy/TestAnsible/description.txt @@ -0,0 +1 @@ +Test if it's detected \ No newline at end of file diff --git a/deploy/TestAnsible/hosts b/deploy/TestAnsible/hosts new file mode 100644 index 0000000..07e4869 --- /dev/null +++ b/deploy/TestAnsible/hosts @@ -0,0 +1,12 @@ +--- +all: + vars: + ansible_python_interpreter: /usr/bin/python3 +main: + hosts: + host1: + ansible_host: 0.0.0.0 # Replace with your remote IP + ansible_port: 44003 # Replace with your remote SSH port + ansible_user: master # Replace wtih your username + ansible_ssh_pass: password + ansible_sudo_pass: password \ No newline at end of file diff --git a/deploy/TestAnsible/site.yml b/deploy/TestAnsible/site.yml new file mode 100644 index 0000000..3dc78ac --- /dev/null +++ b/deploy/TestAnsible/site.yml @@ -0,0 +1,8 @@ +--- + +- hosts: all + + tasks: + - name: simple-ansibleplaybook + debug: + msg: Your are running 'simple-ansibleplaybook' example \ No newline at end of file diff --git a/plugin/generate_test_case.sh b/plugin/generate_test_case.sh index 0022c15..edb882b 100644 --- a/plugin/generate_test_case.sh +++ b/plugin/generate_test_case.sh @@ -1 +1 @@ -cp -r TestAnsible/ deploy/ +cp -r plugin/TestAnsible/ deploy/