Skip to content

Commit

Permalink
Pass Ceph settings through to Packer
Browse files Browse the repository at this point in the history
  • Loading branch information
milliams committed Oct 31, 2023
1 parent 6748930 commit ef5010d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion roles/packer/templates/prepare_ansible.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ sudo dnf config-manager --set-enabled ol8_codeready_builder
sudo mkdir -p /etc/ansible/facts.d/
echo 'packer' | sudo -S sh -c '
cat > /etc/ansible/facts.d/citc.fact <<EOF
{"csp":"{{ ansible_local.citc.csp }}", "fileserver_ip":"{{ ansible_local.citc.fileserver_ip }}", "mgmt_hostname":"{{ mgmt_hostname }}", "ldap_hostname":"{{ ldap_hostname }}", "ldap_dm_password":"{{ ldap_dm_password }}" }
{"csp":"{{ ansible_local.citc.csp }}", "fileserver_ip":"{{ ansible_local.citc.fileserver_ip }}", "mgmt_hostname":"{{ mgmt_hostname }}", "ldap_hostname":"{{ ldap_hostname }}", "ldap_dm_password":"{{ ldap_dm_password }}", "cluster_id":"{{ ansible_local.citc.cluster_id }}" }
EOF'
sudo chmod u=rw,g=,o= /etc/ansible/facts.d/citc.fact
{% if ansible_local.citc.csp == "openstack" %}
echo 'packer' | sudo -S sh -c '
cat > /etc/ansible/facts.d/citc_ceph.fact <<EOF
{"secret":"{{ ansible_local.citc_ceph.secret }}" }
EOF'
sudo chmod u=rw,g=,o= /etc/ansible/facts.d/citc.fact
{% endif %}
sudo mv /tmp/citc_authorized_keys /root/citc_authorized_keys

0 comments on commit ef5010d

Please sign in to comment.