WIP: add-build-sshkey: add centos/rhel-8 support
Assues we install libselinux on these platforms as otherwise Ansible could choke with: TASK [add-build-sshkey : Enable access via build key on all nodes] "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!" Change-Id: I91ec606b5b4e8dce7b71912fdc5890ac6aaf20ef
This commit is contained in:
parent
8624201e0c
commit
0663bb5a52
|
@ -0,0 +1 @@
|
|||
add_build_sshkey_system_packages: []
|
|
@ -1,3 +1,14 @@
|
|||
- name: Include OS specific variables
|
||||
include_vars: "{{ item }}"
|
||||
failed_when: false
|
||||
loop:
|
||||
- "family-{{ ansible_os_family | lower }}.yml"
|
||||
- "family-{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version.split('.')[0:2] | join('-') | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version.split('.')[0:3] | join('-') | lower }}.yml"
|
||||
|
||||
- name: Check to see if ssh key was already created for this build
|
||||
stat:
|
||||
path: "{{ zuul_temp_ssh_key }}"
|
||||
|
@ -6,6 +17,11 @@
|
|||
run_once: true
|
||||
failed_when: false
|
||||
|
||||
- name: Install required packages
|
||||
when: add_build_sshkey_system_packages
|
||||
package:
|
||||
name: "{{ add_build_sshkey_system_packages }}"
|
||||
|
||||
- name: Create a new key in workspace based on build UUID
|
||||
include: create-key-and-replace.yaml
|
||||
when:
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
add_build_sshkey_system_packages:
|
||||
- python3-libselinux
|
|
@ -10,6 +10,16 @@
|
|||
- public_key: |
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChDsP7zEq1JxPLb0Zqj43LIlVoXONCQ1Ko5i9ih/4xm6p0Jn00kpCoVQMb4X2Zys1vWTgpd+r9C/ZoYPFeWuQ8rPCbw4VsocMdwkz7mCPkMDVyPwERjRgt1sTl9WGgtlm2zq/76bmEpuY6PM+nFtJS7UE4XlfoHFK3pR/hgMFi8CX/ILAdtpU96dW2vmXkUt5yj05GHMXKeSU+B5pUEsERgQknH3JBdc/jvKv9dg5zt0jPM6hu5iwgIbMNHydxg4huFO6gKuP+mCNQctK23VMxVXSOYivx8qxu4uzGnBZna01Gi8mY5An4mIQTdcO3KpppOceoDjfEFIOiOnBVoggH testkey
|
||||
|
||||
|
||||
- job:
|
||||
name: zuul-jobs-test-add-build-sshkey
|
||||
description: Test the add-build-sshkey role
|
||||
files:
|
||||
- roles/add-build-sshkey/.*
|
||||
#run: test-playbooks/base-roles/add-build-sshkey-test.yaml
|
||||
vars:
|
||||
role_name: add-build-sshkey
|
||||
|
||||
- job:
|
||||
name: zuul-jobs-test-add-gpgkey
|
||||
description: Test the add-gpgkey role
|
||||
|
|
Loading…
Reference in New Issue