summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Peck <bill@pecknet.com>2020-05-13 14:20:18 -0400
committerBill Peck <bill@pecknet.com>2020-06-04 10:59:27 -0400
commitfa25861a3e919060172f77a4aa7ab3569103ca91 (patch)
tree9c57689daa74bcbf20d6d457da5d0de3e80cc128
parent1888d918106a3e961e067bbe062351e4e88df9fa (diff)
Fix job_info reference
job_info is only available from hostvars.localhost.job_info. fix restraint command to ignore host keys. use {{ local_repo }} instead of hard coded /var/www/html. Change-Id: Icf4445580862b3c6af5d254b585e4970bbf7b262
-rw-r--r--files/job2dciplaybook.xsl6
-rw-r--r--tasks/main.yml10
2 files changed, 9 insertions, 7 deletions
diff --git a/files/job2dciplaybook.xsl b/files/job2dciplaybook.xsl
index f3084a4..5dca6ac 100644
--- a/files/job2dciplaybook.xsl
+++ b/files/job2dciplaybook.xsl
@@ -41,7 +41,7 @@
</xsl:variable>- name: Create task directory if it does not exist
delegate_to: localhost
file:
- path: /var/www/html/tasks/<xsl:value-of select="$dirname"/>
+ path: "{{ local_repo }}/tasks/<xsl:value-of select="$dirname"/>"
state: directory
mode: '0755'
<xsl:choose>
@@ -57,14 +57,14 @@
delegate_to: localhost
archive:
path: ./git_repos/<xsl:value-of select="$repo_base_path"/>/
- dest: /var/www/html/tasks/<xsl:value-of select="$dirname"/><xsl:value-of select="$basename"/>.tgz
+ dest: "{{ local_repo }}/tasks/<xsl:value-of select="$dirname"/><xsl:value-of select="$basename"/>.tgz"
</xsl:when>
<xsl:otherwise>- name: Download Task
delegate_to: localhost
get_url:
url: <xsl:value-of select="$repo_uri"/>
- dest: /var/www/html/tasks/<xsl:value-of select="$dirname"/><xsl:value-of select="$basename"/>
+ dest: "{{ local_repo }}/tasks/<xsl:value-of select="$dirname"/><xsl:value-of select="$basename"/>"
mode: 0755
</xsl:otherwise>
diff --git a/tasks/main.yml b/tasks/main.yml
index fefecf7..509316f 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -20,7 +20,8 @@
- name: Mirror cki job local
delegate_to: localhost
get_url:
- url: "{{ cki_job_url | default(job_info.job.topic.data.cki_job_url) }}"
+ url: "{{ cki_job_url |
+ default(hostvars.localhost.job_info.job.topic.data.cki_job_url) }}"
dest: "{{ rstrnt_job.path }}/cki_job.xml"
mode: 0755
@@ -35,7 +36,7 @@
- name: Create lookaside dir
delegate_to: localhost
file:
- path: /var/www/html/lookaside
+ path: "{{ local_repo }}/lookaside"
state: directory
mode: '0755'
@@ -43,7 +44,7 @@
delegate_to: localhost
get_url:
url: "{{ item.dependency.url }}"
- dest: /var/www/html/lookaside/
+ dest: "{{ local_repo }}/lookaside/"
mode: 0755
with_items: "{{ dependencies.matches }}"
@@ -70,7 +71,8 @@
delegate_to: localhost
command: |
restraint --job {{ rstrnt_job.path }}/processed_cki_job.xml --host
- 1=root@{{ fqdn }} -v
+ 1=root@{{ fqdn }} -v -e 'ssh -o UserKnownHostsFile=/dev/null
+ -o StrictHostKeyChecking=no'
args:
chdir: "{{ rstrnt_job.path }}"