60 lines
2.2 KiB
YAML
60 lines
2.2 KiB
YAML
---
|
|
#
|
|
# Tasks for pbench install
|
|
#
|
|
|
|
- name: Get repo file from undercloud
|
|
fetch: src=/etc/yum.repos.d/"{{ repo_name }}" dest=roles/pbench/files/el.repo flat=yes
|
|
when: undercloud
|
|
changed_when: false
|
|
|
|
- name: Copy repo file to controllers/computes
|
|
copy: src=el.repo dest=/etc/yum.repos.d/
|
|
when: not undercloud
|
|
|
|
- name: Install internal pbench repo file
|
|
get_url: url="{{ pbench_internal_repo_file_url }}" dest=/etc/yum.repos.d/pbench-internal.repo
|
|
|
|
- name: Install pbench copr repo file
|
|
get_url: url="{{ pbench_repo_file_url }}" dest=/etc/yum.repos.d/pbench.repo
|
|
|
|
- name: Install configtools copr repo file
|
|
get_url: url="{{ configtools_repo_file_url }}" dest=/etc/yum.repos.d/configtools.repo
|
|
|
|
- name: Install pbench-agent
|
|
yum: name=pbench-agent-internal state=latest
|
|
|
|
- name: Ensure pbench directory exists as stack user on undercloud
|
|
file: path=/var/lib/pbench-agent state=directory owner=stack group=stack recurse=yes
|
|
when: undercloud
|
|
|
|
- name: Ensure pbench tools-default directory exists as stack user on undercloud
|
|
file: path=/var/lib/pbench-agent/tools-default state=directory owner=stack group=stack recurse=yes
|
|
when: undercloud
|
|
|
|
- name: Ensure pbench id_rsa is owned by stack
|
|
file: path=/opt/pbench-agent/id_rsa owner=stack group=stack mode=0600
|
|
when: undercloud
|
|
|
|
- name: Get undercloud root ssh public key
|
|
fetch: src=/root/.ssh/id_rsa.pub dest=roles/pbench/files/undercloud_root_id_rsa.pub flat=yes
|
|
when: undercloud
|
|
changed_when: false
|
|
|
|
- name: Get undercloud stack ssh public key
|
|
fetch: src=/home/stack/.ssh/id_rsa.pub dest=roles/pbench/files/undercloud_stack_id_rsa.pub flat=yes
|
|
when: undercloud
|
|
changed_when: false
|
|
|
|
- name: Unblock root user ssh on controllers/computes
|
|
lineinfile: dest=/root/.ssh/authorized_keys state=absent regexp="Please login as the user" mode=0600
|
|
when: not undercloud
|
|
|
|
- name: Copy undercloud root ssh public key to controllers/compute root user's authorized_keys
|
|
lineinfile: dest=/root/.ssh/authorized_keys state=present line="{{ undercloud_root_ssh_key }}"
|
|
when: not undercloud
|
|
|
|
- name: Copy undercloud stack ssh public key to controllers/compute root user's authorized_keys
|
|
lineinfile: dest=/root/.ssh/authorized_keys state=present line="{{ undercloud_stack_ssh_key }}"
|
|
when: not undercloud
|