Rework config and add ssh
This commit is contained in:
parent
a32cc255a7
commit
aa9bfe1f95
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ id_ed25519
|
|||||||
.terraform/
|
.terraform/
|
||||||
.envrc
|
.envrc
|
||||||
*.retry
|
*.retry
|
||||||
|
ansible/*.retry
|
||||||
|
@ -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
|
||||||
|
@ -66,16 +66,24 @@ x-compute-hosts: &x-compute-hosts
|
|||||||
compute1:
|
compute1:
|
||||||
ip: 172.29.220.6
|
ip: 172.29.220.6
|
||||||
x-storage-hosts: &x-storage-hosts
|
x-storage-hosts: &x-storage-hosts
|
||||||
infra1:
|
storage1:
|
||||||
ip: 172.29.220.7
|
ip: 172.29.220.7
|
||||||
container_vars:
|
container_vars:
|
||||||
cinder_backends:
|
cinder_backends:
|
||||||
limit_container_types: cinder_volume
|
limit_container_types: cinder_volume
|
||||||
lvm:
|
nfs_volume:
|
||||||
volume_group: cinder-volumes
|
volume_backend_name: NFS_VOLUME1
|
||||||
volume_driver: cinder.volume.drivers.lvm.LVMVolumeDriver
|
volume_driver: cinder.volume.drivers.nfs.NfsDriver
|
||||||
volume_backend_name: LVM_iSCSI
|
nfs_mount_options: "rsize=65535,wsize=65535,timeo=1200,actimeo=120"
|
||||||
iscsi_ip_address: "172.29.228.7"
|
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
|
## Infrastructure
|
||||||
@ -107,8 +115,8 @@ network_hosts:
|
|||||||
<<: *x-infra-hosts
|
<<: *x-infra-hosts
|
||||||
compute_hosts:
|
compute_hosts:
|
||||||
<<: *x-compute-hosts
|
<<: *x-compute-hosts
|
||||||
#storage_hosts:
|
storage_hosts:
|
||||||
# <<: *x-storage-hosts
|
<<: *x-storage-hosts
|
||||||
|
|
||||||
###
|
###
|
||||||
### Infrastructure
|
### Infrastructure
|
||||||
|
4
ansible/playbooks/files/user_galera.yml
Normal file
4
ansible/playbooks/files/user_galera.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
# Set max connections to 500 to support running all services
|
||||||
|
#
|
||||||
|
galera_max_connections: 500
|
@ -1 +0,0 @@
|
|||||||
infra1
|
|
@ -36,7 +36,7 @@
|
|||||||
- name: Set SELinux to permissive
|
- name: Set SELinux to permissive
|
||||||
ansible.posix.selinux:
|
ansible.posix.selinux:
|
||||||
policy: targeted
|
policy: targeted
|
||||||
state: permissive
|
state: disabled
|
||||||
tags: services
|
tags: services
|
||||||
|
|
||||||
- name: Ensure packages are upgraded
|
- name: Ensure packages are upgraded
|
||||||
@ -45,6 +45,31 @@
|
|||||||
state: latest
|
state: latest
|
||||||
tags: packages
|
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
|
- name: Disable SSH Agent Forwarding
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/ssh/sshd_config
|
dest: /etc/ssh/sshd_config
|
||||||
|
@ -47,8 +47,8 @@
|
|||||||
- name: Copy template to etc
|
- name: Copy template to etc
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
src: /opt/openstack-ansible/etc/openstack_deploy
|
src: /opt/openstack-ansible/etc/openstack_deploy/
|
||||||
dest: /etc/
|
dest: /etc/openstack_deploy/
|
||||||
directory_mode: yes
|
directory_mode: yes
|
||||||
|
|
||||||
- name: Copy our openstack configs
|
- name: Copy our openstack configs
|
||||||
@ -59,6 +59,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- openstack_user_config
|
- openstack_user_config
|
||||||
- user_lxc
|
- user_lxc
|
||||||
|
- user_galera
|
||||||
|
|
||||||
- name: Create secrets
|
- name: Create secrets
|
||||||
become: true
|
become: true
|
||||||
@ -73,10 +74,10 @@
|
|||||||
tags: syntax
|
tags: syntax
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: openstack-ansible --syntax-check ${item}.yml
|
cmd: "openstack-ansible --syntax-check setup-{{ item }}.yml"
|
||||||
args:
|
args:
|
||||||
chdir: /opt/openstack-ansible/playbooks/
|
chdir: /opt/openstack-ansible/playbooks/
|
||||||
with_items:
|
loop:
|
||||||
- hosts
|
- hosts
|
||||||
- infrastructure
|
- infrastructure
|
||||||
- openstack
|
- openstack
|
||||||
|
Loading…
Reference in New Issue
Block a user