-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmrp.yml
43 lines (37 loc) · 1.58 KB
/
mrp.yml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
# TODO: When MrP has user control, add users here.
- hosts: localhost
gather_facts: no
vars:
mr_provisioner_do_provision: False
mr_provisioner_url: "http://10.40.0.11:5000"
vars_files:
- vars/mrp_creds.yml.secret
- vars/list_preseeds.yml
tasks:
- name: Get the MrP client
git:
repo: 'https://github.com/Linaro/mr-provisioner-client.git'
dest: './mr-provisioner-client'
version: 'master'
- name: Upload preseed from info in list_preseed.yml
shell: "./mr-provisioner-client/mrp_client.py --mrp-url={{ mr_provisioner_url | quote }} --mrp-token={{ mr_provisioner_auth_token | quote }} preseed --action upload --preseed-name {{ item.name | quote }} --description {{ item.description | quote }} --type {{ item.type }} --preseed-path {{ item.path | quote }} --knowngood --public"
with_items: "{{ list_preseeds }}"
# TODO: When MrP allows adding users to machines, add jenkins user to all
- hosts: jenkins
gather_facts: yes
remote_user: root
tasks:
- include_vars:
file: ./vars/jslave_tokens.yml.secret
- name: Clear token files first
file:
state: absent
path: "/home/{{ item.jslave }}/mrp_token"
with_items: "{{ jslave_tokens }}"
- name: Put the tokens
lineinfile:
path: "/home/{{ item.jslave }}/mrp_token"
create: yes
line: "{{ item.token }}"
with_items: "{{ jslave_tokens }}"