To further pbench install, make root account accessible directly from user stack on controllers.
This commit is contained in:
parent
c7a8eaf216
commit
f99b6f9073
@ -4,3 +4,4 @@ ansible_sudo: yes
|
||||
connmon_host: 192.0.2.1
|
||||
dns_server: 8.8.8.8
|
||||
pbench_repo_file_url: http://pbench.example.com/repo/yum.repos.d/pbench.repo
|
||||
repo_name: rhos-release-rhel-7.2.repo
|
||||
|
@ -24,6 +24,7 @@
|
||||
director: false
|
||||
pbench: false
|
||||
shaker: false
|
||||
stack_ssh_key: "{{ lookup('file', 'roles/common/files/stack_id_rsa.pub') }}"
|
||||
roles:
|
||||
- common
|
||||
- connmon
|
||||
|
@ -13,8 +13,8 @@
|
||||
shell: echo "nameserver {{ dns_server }}" | tee -a /etc/resolv.conf
|
||||
when: dns_record.rc == 1
|
||||
|
||||
- name: Get rhel repo file tfrom director
|
||||
fetch: src=/etc/yum.repos.d/rhos-release-rhel-7.2.repo dest=roles/common/files/rhel.repo flat=yes
|
||||
- name: Get rhel repo file from director
|
||||
fetch: src=/etc/yum.repos.d/"{{ repo_name }}" dest=roles/common/files/rhel.repo flat=yes
|
||||
when: director
|
||||
changed_when: false
|
||||
|
||||
|
@ -14,3 +14,16 @@
|
||||
- name: Ensure pbench directory exists as stack user on director
|
||||
file: path=/var/lib/pbench-agent state=directory owner=stack group=stack recurse=yes
|
||||
when: director
|
||||
|
||||
- name: Get director stack ssh public key
|
||||
fetch: src=/home/stack/.ssh/id_rsa.pub dest=roles/common/files/stack_id_rsa.pub flat=yes
|
||||
when: director
|
||||
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 director
|
||||
|
||||
- name: Copy director stack ssh public key to controllers/compute authorized_keys
|
||||
lineinfile: dest=/root/.ssh/authorized_keys state=present line="{{ stack_ssh_key }}"
|
||||
when: not director
|
||||
|
Loading…
x
Reference in New Issue
Block a user