From 86b5c8fd25860fd0c22de709ac9b9e253c459e9e Mon Sep 17 00:00:00 2001 From: Kevin Faulkner Date: Mar 04 2021 02:59:53 +0000 Subject: more packages --- diff --git a/tasks/main.yml b/tasks/main.yml index 4fecc69..065e4ed 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,13 +2,12 @@ # tasks file for project_build - name: 'install cli' package: - name: java-latest-openjdk-headless + name: "{{ item }}" state: installed - -- name: "override, since we wrote the contents" - get_url: - url: "http://{{ jenkins_master_host }}:{{ jenkins_master_port }}/jnlpJars/jenkins-cli.jar" - dest: /usr/local/lib/ + loop: + - java-latest-openjdk-headless + - unzip + - lftp - name: "create jenkins local automation user" user: @@ -26,6 +25,14 @@ group: "{{ deploy_group }}" state: directory +- name: 'should be there from skel' + file: + path: "{{ automation_user_home }}/.local/bin" + mode: 0770 + owner: "{{ automation_user }}" + group: "{{ deploy_group }}" + state: directory + - name: PATH should be set at etc, and further modified here, lets ensure PATH includes the tools lineinfile: owner: "{{ automation_user }}" @@ -45,8 +52,13 @@ {{ automation_ssh_pub }} - name: container host ssh key - command: "ssh-keyscan -t ecdsa-sha2-nistp256 10.88.0.1" + command: "ssh-keyscan -t ecdsa-sha2-nistp256 {{ item }}" register: container_host_ssh_key + loop: + - "bitbucket.org" + - "github.com" + - "gitlab.com" + - "10.88.0.1" - name: set ssh key in jenkins home volume lineinfile: @@ -54,7 +66,19 @@ group: "{{ deploy_group }}" path: "{{ jenkins_home }}/.ssh/known_hosts" create: yes - line: "{{ container_host_ssh_key }}" + line: "{{ item.stdout }}" + loop: "{{ container_host_ssh_key.results }}" + +- name: ensure jenkins is up + wait_for: + port: 33100 + host: 10.88.0.1 + delay: 10 + +- name: "override, since we wrote the contents" + get_url: + url: "http://{{ jenkins_master_host }}:{{ jenkins_master_port }}/jnlpJars/jenkins-cli.jar" + dest: /usr/local/lib/ - name: "add thin-backup plugin" command: "java -jar /usr/local/lib/jenkins-cli.jar -u -s {{ jenkins_master_host }}:{{ jenkins_master_port }}/ install-plugin thin-backup"