Tadas Sutkaitis | 7a28658 | 2024-05-01 02:12:08 +0300 | [diff] [blame] | 1 | # Copyright (c) 2024 VEXXHOST, Inc. |
Mohammed Naser | b7b97d6 | 2022-03-12 16:30:00 -0500 | [diff] [blame] | 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
Tadas Sutkaitis | 7a28658 | 2024-05-01 02:12:08 +0300 | [diff] [blame] | 15 | - name: Uninstall OpenStack client system packages |
| 16 | ansible.builtin.package: |
| 17 | name: "{{ openstack_cli_packages }}" |
| 18 | state: absent |
| 19 | when: ansible_facts['os_family'] in ['Debian'] |
| 20 | |
| 21 | - name: Uninstall Ubuntu Cloud Archive keyring |
Mohammed Naser | d939b31 | 2023-02-18 19:38:49 +0000 | [diff] [blame] | 22 | ansible.builtin.apt: |
| 23 | name: ubuntu-cloud-keyring |
Tadas Sutkaitis | 7a28658 | 2024-05-01 02:12:08 +0300 | [diff] [blame] | 24 | state: absent |
| 25 | when: ansible_facts['os_family'] in ['Debian'] |
Mohammed Naser | d939b31 | 2023-02-18 19:38:49 +0000 | [diff] [blame] | 26 | |
Tadas Sutkaitis | 7a28658 | 2024-05-01 02:12:08 +0300 | [diff] [blame] | 27 | - name: Remove Ubuntu Cloud Archive repository |
Mohammed Naser | d939b31 | 2023-02-18 19:38:49 +0000 | [diff] [blame] | 28 | ansible.builtin.apt_repository: |
| 29 | filename: ubuntu-cloud-archive |
Mohammed Naser | 558a229 | 2023-03-02 23:00:38 +0100 | [diff] [blame] | 30 | repo: "{{ openstack_cli_cloud_archive_repo }}" |
Tadas Sutkaitis | 7a28658 | 2024-05-01 02:12:08 +0300 | [diff] [blame] | 31 | state: absent |
| 32 | when: ansible_facts['os_family'] in ['Debian'] |
Mohammed Naser | b7b97d6 | 2022-03-12 16:30:00 -0500 | [diff] [blame] | 33 | |
| 34 | - name: Generate OpenStack-Helm endpoints |
| 35 | ansible.builtin.include_role: |
| 36 | name: openstack_helm_endpoints |
| 37 | vars: |
| 38 | openstack_helm_endpoints_list: ["identity"] |
| 39 | |
| 40 | - name: Generate openrc file |
| 41 | become: true |
| 42 | ansible.builtin.template: |
| 43 | src: openrc.j2 |
| 44 | dest: /root/openrc |
| 45 | owner: root |
| 46 | group: root |
Tadas Sutkaitis | 4ace418 | 2023-02-27 04:31:52 +0200 | [diff] [blame] | 47 | mode: "0600" |
Tadas Sutkaitis | 7a28658 | 2024-05-01 02:12:08 +0300 | [diff] [blame] | 48 | |
| 49 | - name: Generate openstack aliases |
| 50 | become: true |
| 51 | ansible.builtin.template: |
| 52 | src: atmosphere.sh.j2 |
| 53 | dest: /etc/profile.d/atmosphere.sh |
| 54 | owner: root |
| 55 | group: root |
| 56 | mode: "0644" |