forked from openstack/kayobe
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from stackhpc/yoga-leafcloud-ci
yoga: Backport DNF and Apt auth support
- Loading branch information
Showing
14 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"description": "List of Apt auth configurations", | ||
"type": "array", | ||
"items": { | ||
"description": "Apt auth configuration", | ||
"type": "object", | ||
"required": ["machine", "login", "password", "filename"], | ||
"properties": { | ||
"machine": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"login": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"password": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"filename": { | ||
"type": "string", | ||
"minLength": 1 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
- name: Validate Apt auth config | ||
ansible.utils.validate: | ||
criteria: "{{ lookup('ansible.builtin.file', 'auth_schema.json') }}" | ||
data: "{{ apt_auth }}" | ||
|
||
- name: Ensure the Apt auth.conf.d directory exists | ||
ansible.builtin.file: | ||
path: "/etc/apt/auth.conf.d" | ||
state: directory | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
become: true | ||
|
||
- name: Configure Apt auth files | ||
ansible.builtin.template: | ||
src: "auth.conf.j2" | ||
dest: "/etc/apt/auth.conf.d/{{ auth.filename }}" | ||
owner: root | ||
group: root | ||
mode: 0600 | ||
become: true | ||
# apt_auth contains sensitive data, so iterate over indices to avoid exposing | ||
# them in Ansible output. | ||
loop: "{{ apt_auth | map(attribute='filename') }}" | ||
loop_control: | ||
index_var: auth_index | ||
vars: | ||
auth: "{{ apt_auth[auth_index] }}" | ||
notify: | ||
- Update apt cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
- import_tasks: keys.yml | ||
|
||
- import_tasks: repos.yml | ||
|
||
- import_tasks: auth.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# {{ ansible_managed }} | ||
|
||
machine {{ auth.machine }} | ||
login {{ auth.login }} | ||
password {{ auth.password }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
features: | ||
- | | ||
Adds support for auth configuration for Apt respositories and proxies using | ||
``auth.conf`` files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
features: | ||
- | | ||
Adds support for specifying credentials (username and password) for custom | ||
DNF repositories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ selinux # MIT | |
# INI parsing | ||
oslo.config>=5.2.0 # Apache-2.0 | ||
paramiko # LGPL | ||
jsonschema<5 # MIT |