Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenStack: Set security group for Packer image build instance #148

Open
wants to merge 2 commits into
base: openstack
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions roles/packer/files/all.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ variable "oracle_key_file" {}

variable "openstack_network" {}
variable "openstack_ceph_network" {}
variable "openstack_security_group" {}

variable "destination_image_name" {}
variable "cluster" {}
Expand Down Expand Up @@ -117,6 +118,7 @@ source "openstack" "openstack" {
source_image_name = "Rocky-8.8"
ssh_username = var.ssh_username
networks = [var.openstack_network, var.openstack_ceph_network]
security_groups = [var.openstack_security_group]
image_tags = ["compute"]
metadata = {"cluster": var.cluster}
}
Expand Down
1 change: 1 addition & 0 deletions roles/packer/templates/variables.pkrvars.hcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ oracle_key_file = "/home/slurm/.oci/oci_api_key.pem"

openstack_network = "{%- if startnode_config.network_id is defined -%}{{ startnode_config.network_id }}{%- endif -%}"
openstack_ceph_network = "{%- if startnode_config.ceph_network is defined -%}{{ startnode_config.ceph_network }}{%- endif -%}"
openstack_security_group = "{%- if startnode_config.security_group is defined -%}{{ startnode_config.security_group }}{%- endif -%}"
5 changes: 5 additions & 0 deletions roles/sssd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
- name: Update CA trust anchors
ansible.builtin.command: update-ca-trust # noqa no-changed-when

- name: Install authselect
ansible.builtin.package:
name: authselect
state: present

- name: Enable SSSD auth in PAM
ansible.builtin.command: authselect select sssd --force # noqa no-changed-when

Expand Down
Loading