From 7141386c5aecd6c55ea428b9661838d38f2adbac Mon Sep 17 00:00:00 2001 From: Deekshith SN Date: Wed, 22 Jul 2020 11:01:38 +0530 Subject: [PATCH] Create multiple_plays.yml --- multiple_plays.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 multiple_plays.yml diff --git a/multiple_plays.yml b/multiple_plays.yml new file mode 100644 index 0000000..ff24693 --- /dev/null +++ b/multiple_plays.yml @@ -0,0 +1,27 @@ +--- +- hosts: localhost + become: yes + gather_facts: false + tasks: + - name: installing wget + apt: + name: wget + state: present + - name: download Jenkins + get_url: + url: https://updates.jenkins-ci.org/download/war/2.248/jenkins.war + dest: /home/spovedd + +- hosts: dev + become: yes + gather_facts: false + tasks: + - name: copy jenkins war to host machines + copy: + src: /home/spovedd/jenkins.war + dest: /home/jenkins.war + - name: creating folder structure and running jenkins in the background + shell: | + mkdir -p /home/spovedd/jenkins + mv /home/jenkins.war /home/spovedd/jenkins + nohup java -jar /home/spovedd/jenkins/jenkins.war &