-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: problems found when deploying kubernetes 1.24.3 cluster
- Loading branch information
1 parent
5c8f598
commit 703e3ae
Showing
18 changed files
with
737 additions
and
138 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
ansible/playbook/openstack/openstack_auth_passstore_v3password.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
- name: "OpenStack Authentication v3password" | ||
hosts: localhost | ||
gather_facts: false | ||
|
||
tasks: | ||
- name: "Set openstack_auth facts" | ||
set_fact: | ||
openstack_auth: | ||
openstack_project_name: "{{ query('passwordstore', 'openstack/host/project_name')[0] }}" | ||
openstack_console_user: "{{ query('passwordstore', 'openstack/host/console_user')[0] }}" | ||
openstack_console_password: "{{ query('passwordstore', 'openstack/host/console_pw')[0] }}" | ||
openstack_user_domain: "{{ query('passwordstore', 'openstack/host/console_domain')[0] }}" | ||
openstack_project_domain: "{{ query('passwordstore', 'openstack/host/os_domain')[0] }}" | ||
openstack_os_auth_url: "{{ query('passwordstore', 'openstack/host/os_auth_url')[0] }}" | ||
... |
72 changes: 72 additions & 0 deletions
72
ansible/playbook/openstack/openstack_vm_create_post_passwordstore.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
# Variables: | ||
# - "vm_name": "n311-test" | ||
|
||
# tag::instanciate_rhos_auth[] | ||
- name: "Instanciate RHOS authentication" | ||
ansible.builtin.import_playbook: "openstack_auth_passstore_v3password.yml" | ||
vars: | ||
vm_user: "snowdrop" | ||
pass_provider: "openstack" | ||
# end::instanciate_rhos_auth[] | ||
|
||
- name: "Refresh inventory" | ||
hosts: localhost | ||
gather_facts: True | ||
|
||
tasks: | ||
- name: Refresh the inventory so the newly added host is available | ||
meta: refresh_inventory | ||
|
||
- name: "Post create actions" | ||
ansible.builtin.debug: | ||
msg: | ||
- "Next step is adding the host to the controller known hosts." | ||
- "If it fails, because the VM is not started yet, it can be executed again manualy using the following command:" | ||
- "" | ||
- "ansible-playbook ansible/playbook/openstack/openstack_vm_create_post_passwordstore.yml -e vm_name={{ vm_name }}" | ||
|
||
- name: "Add host to known hosts {{ hostvars[vm_name]['ansible_ssh_host'] }}" | ||
ansible.builtin.known_hosts: | ||
name: "{{ hostvars[vm_name]['ansible_ssh_host'] }}" | ||
key: "{{ lookup('pipe', 'ssh-keyscan {{ hostvars[vm_name].ansible_ssh_host }}') }}" | ||
hash_host: true | ||
|
||
- name: "Wait for the VM to boot and we can ssh" | ||
hosts: "{{ vm_name }}" | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: "Show 'Wait for connection to host' output" | ||
debug: | ||
msg: | ||
- "ip : {{ query('passwordstore', 'openstack/' + vm_name + '/ansible_ssh_host')[0] }}" | ||
- "port : {{ query('passwordstore', 'openstack/' + vm_name + '/ansible_ssh_port')[0] }}" | ||
|
||
- name: "Wait for connection to host" | ||
ansible.builtin.wait_for: | ||
host: "{{ query('passwordstore', 'openstack/' + vm_name + '/ansible_ssh_host')[0] }}" | ||
port: "{{ query('passwordstore', 'openstack/' + vm_name + '/ansible_ssh_port')[0] }}" | ||
timeout: 120 | ||
register: wait_for_connection_reg | ||
|
||
post_tasks: | ||
- name: "DON'T FORGET TO SECURE YOUR SERVER" | ||
debug: | ||
msg: "Trying to start start server securization automatically For manual execution: $ ansible-playbook ansible/playbook/sec_host.yml -e vm_name={{ vm_name }} -e provider=openstack" | ||
|
||
- name: "Openstack VM init" | ||
hosts: "{{ vm_name }}" | ||
gather_facts: yes | ||
|
||
roles: | ||
- role: "openstack/init_vm" | ||
|
||
- name: "Secure new server" | ||
import_playbook: "../sec_host.yml" | ||
vars: | ||
provider: "openstack" | ||
hosts: "{{ vm_name }}" | ||
vm_name: "{{ vm_name }}" | ||
tags: [always] | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cni_plugins_version: v1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.