Rework config and add ssh

This commit is contained in:
Neil Hanlon 2022-01-05 16:57:06 -05:00
parent a32cc255a7
commit aa9bfe1f95
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
7 changed files with 53 additions and 15 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ id_ed25519
.terraform/
.envrc
*.retry
ansible/*.retry

View File

@ -1 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD1SYGS4jZOSofKLEuQUiaEcqrr4RTiXm43CvlGVWynqKJ+iUgpfutenu8hrhozZZCKhqJS1Z48RielPzIhRfcCBrcr7a2VeIKAaMnYQiAvu7DDbAXuGwQqhvqnn5F/3VQwGTvJXMqxhe+YQYL+sCihlMcx7baxudJGDkATXFCl3m+vekKhdIkIBv5i5+Dd9P8sUK+c9KFY8IbMNbHIY5CpNcPvtuP12YdBmCn2unPKm7H0aPKqe27OXqTen8ts9MgeVvq+soDOAGH/PD2Ud38O1WzhWlmnhPzP8VXgdz9/zVCOVUZcVzFQkMop+bc0qqPhUaOWIxehV4QQ+mo9y0XIiSOEbq41QFapCRQBHsl5ctp6wvCXmSJ3GVml1L86G+TI+IPyNeVdXQE+9dkeoNqBB8jDFw5xT6boCoIXLCbjsgHIA6Iq//uvGhQiQcH/OJABYm+8LujE3k6Ksu/W9Jad1xs9owNosFyh871ukfgQl7yr681BK/hHWKwgdH/K8Wcuwm0fbuYBJJufLB4dA4trJsnDySxm+tGYbU+HOiGnGkwImKUqIRZ++FBsX8cNvZ5mH4GaGtUOl5WzCgyXClZ5xXtx5swNN2Eeuhlit7jdIwwJc2IAklaA4zJ1rkNoD5l/4tIvpCsyuCLafxSJAQc5vcqrYQOgXfXdiAhhLTqQ/w== ansible-generated on ala-infra1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDa6BBBJMxOg4ekglpwq/BMe1nZrvCrFs4rh7jCDqXxbpzjwnZuaddLKAcgHrtCAb5LgHrWmglZfwR0PuhMTx0wu59U6FsRTUizX0AQO6zDNAxbrYJ3B8E/vHpvZ9WreejPmRQePuQrICvfAVtJwAK4ZKL+/Y5ZmSIy/7bLvGdyDBRpZdiRKA7nYUHpfmalXWggYESZoryu8BXqVTkmSxMrGGJwtY0qmo/3tXoa2XuIN4TNkJ62+M1HoZhjVdhlzTYZ0VRFm/MFM5HVAlzwcDC1+t7YoNctAPzELijKj8EWhnbUWqCDkFBQ6Ks4q2pb3qNpswhRldk615dOWALqFIGbjdTOaqATIPF6t7mgOSavcQJZMWmnocn3OVAdrAm4xHxhF2RQOmmSWk9a0hPYgiVlZDomjIHxNokjxDAevm0v/vamu0edMjaWAWRCXvtgkyXs6SaDM1nRdssmTlJ99MkiM7VSor68LN7nn6wDj5cpqPeLdiNXFSFz+YXbi7E63UU6BHEoXOs1TZrlu1T06b7WW+eTXuvkfBgGGj2K6Cc5PvWWD+MBuXIzavjXoPXK1e0+pgelIvvByeq/BQJ9to8BVdX49v3lnehfVIWBjSQFeDevjJcDUakVpPaeTT/GoUsy/Xaz8WVrzrbA/Q0q9XWsAdkWjiyyzq7dncTA0AoHqw== ansible-generated on ala-infra1

View File

@ -66,16 +66,24 @@ x-compute-hosts: &x-compute-hosts
compute1:
ip: 172.29.220.6
x-storage-hosts: &x-storage-hosts
infra1:
storage1:
ip: 172.29.220.7
container_vars:
cinder_backends:
limit_container_types: cinder_volume
lvm:
volume_group: cinder-volumes
volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name: LVM_iSCSI
iscsi_ip_address: "172.29.228.7"
nfs_volume:
volume_backend_name: NFS_VOLUME1
volume_driver: cinder.volume.drivers.nfs.NfsDriver
nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120"
nfs_shares_config: /etc/cinder/nfs_shares
shares:
- ip: "172.29.228.7"
share: "/vol/cinder"
#lvm:
# volume_group: cinder-volumes
# volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
# volume_backend_name: LVM_iSCSI
# iscsi_ip_address: "172.29.228.7"
##
## Infrastructure
@ -107,8 +115,8 @@ network_hosts:
<<: *x-infra-hosts
compute_hosts:
<<: *x-compute-hosts
#storage_hosts:
# <<: *x-storage-hosts
storage_hosts:
<<: *x-storage-hosts
###
### Infrastructure

View File

@ -0,0 +1,4 @@
---
# Set max connections to 500 to support running all services
#
galera_max_connections: 500

View File

@ -1 +0,0 @@
infra1

View File

@ -36,7 +36,7 @@
- name: Set SELinux to permissive
ansible.posix.selinux:
policy: targeted
state: permissive
state: disabled
tags: services
- name: Ensure packages are upgraded
@ -45,6 +45,31 @@
state: latest
tags: packages
- name: Generate SSH key
block:
- name: Create ssh key for root
ansible.builtin.user:
name: root
generate_ssh_key: yes
ssh_key_bits: 4096
ssh_key_file: .ssh/id_rsa
register: sshkey_register
tags: sshkey
- name: fetch_keys
tags: sshkey
fetch:
src: "~/.ssh/id_rsa.pub"
dest: "files/buffer/infra-id_rsa.pub"
flat: yes
when: sshkey_register.ssh_public_key != ""
register: sshkey_fetch
when: tag.find("infra") != -1
tags:
- infra
- sshkey
- name: Disable SSH Agent Forwarding
lineinfile:
dest: /etc/ssh/sshd_config

View File

@ -47,8 +47,8 @@
- name: Copy template to etc
ansible.builtin.copy:
remote_src: yes
src: /opt/openstack-ansible/etc/openstack_deploy
dest: /etc/
src: /opt/openstack-ansible/etc/openstack_deploy/
dest: /etc/openstack_deploy/
directory_mode: yes
- name: Copy our openstack configs
@ -59,6 +59,7 @@
with_items:
- openstack_user_config
- user_lxc
- user_galera
- name: Create secrets
become: true
@ -73,10 +74,10 @@
tags: syntax
become: true
ansible.builtin.shell:
cmd: openstack-ansible --syntax-check ${item}.yml
cmd: "openstack-ansible --syntax-check setup-{{ item }}.yml"
args:
chdir: /opt/openstack-ansible/playbooks/
with_items:
loop:
- hosts
- infrastructure
- openstack