Browse Source

update blueprints prep

ca-cert-and-multi-ks
ePietry 2 years ago
parent
commit
3e53bc653b
  1. 3
      .gitignore
  2. 14
      ansible/playbooks/blueprint_preparation.yaml

3
.gitignore

@ -1,4 +1,3 @@
ansible/inventory.yaml ansible/inventory.yaml
.vscode .vscode
ansible/test ansible/credentials
ansible/test.pub

14
ansible/playbooks/blueprint_preparation.yaml

@ -1,6 +1,11 @@
- name: Create the initial ostree repo - name: Create the initial ostree repo
hosts: all hosts: all
tasks: tasks:
- name: Display microshift package information
ansible.builtin.debug:
var: "{{ ADMIN_SSH_PUBLIC_KEY }}"
- name: Extract userspace architecture - name: Extract userspace architecture
ansible.builtin.set_fact: ansible.builtin.set_fact:
userspace_arch: "{{ ansible_facts['userspace_architecture'] }}" userspace_arch: "{{ ansible_facts['userspace_architecture'] }}"
@ -17,6 +22,7 @@
ansible.builtin.debug: ansible.builtin.debug:
var: microshift_info.stdout_lines var: microshift_info.stdout_lines
- name: Install mkpasswd and podman packages - name: Install mkpasswd and podman packages
become: true become: true
ansible.builtin.dnf: ansible.builtin.dnf:
@ -37,7 +43,13 @@
line: "{{ item.line }}" line: "{{ item.line }}"
loop: loop:
- { regexp: '^__ADMIN_PASSWORD__=', line: '__ADMIN_PASSWORD__={{ admin_password_hash.stdout }}' } - { regexp: '^__ADMIN_PASSWORD__=', line: '__ADMIN_PASSWORD__={{ admin_password_hash.stdout }}' }
- { regexp: '^__ADMIN_SSH_PUBLIC_KEY__=', line: '__ADMIN_SSH_PUBLIC_KEY__={{ ADMIN_SSH_PUBLIC_KEY }}' }
- name: Replace ADMIN_SSH_PUBLIC_KEY placeholder with the actual key
ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/red-hat-kiosk/imagebuilder/kiosk.toml"
regexp: '^__ADMIN_SSH_PUBLIC_KEY__='
line: '__ADMIN_SSH_PUBLIC_KEY__={{ ADMIN_SSH_PUBLIC_KEY }}'
backrefs: true
- name: Add custom packages source to composer - name: Add custom packages source to composer
ansible.builtin.shell: | ansible.builtin.shell: |

Loading…
Cancel
Save