diff --git a/.gitignore b/.gitignore index d68d78c14586dee214deb847e2a440af651c5aa7..c2ea86a02714abb49ff9c1d6a444313d9619f4a8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ # Ignore files created by ansible-playbook *.retry -/ansible/secrets/ /ansible/rke.log /ansible/cluster_data/ test/rke.log @@ -18,10 +17,10 @@ test/rke.log # Ignore files created during CI using test/ci-bootstrap.py /test/group_vars/all/ -/test/secrets/ /test/inventory.yml /test/behave/behave.ini /test/behave/rerun_failing.features +/ansible/cluster_data/ # Ignore files created during tests /test/behave/**/screenshots/ diff --git a/ansible/group_vars/all/oas.yml b/ansible/group_vars/all/oas.yml index a4ba91e624b785b209e7a5383156291a56e0cb65..a4c3368aabf1125abaa99420a6e46128f65c4f5e 100644 --- a/ansible/group_vars/all/oas.yml +++ b/ansible/group_vars/all/oas.yml @@ -7,11 +7,11 @@ ansible_python_interpreter: "/usr/bin/env python3" # Nextcloud administrator password. If you do not change this value, it gets # generated and stored in `secrets/nextcloud_admin_password`. You can also choose # your own password and fill it in here instead. -nextcloud_password: "{{ lookup('password', './secrets/nextcloud_admin_password chars=ascii_letters') }}" -nextcloud_mariadb_password: "{{ lookup('password', './secrets/nextcloud_mariadb_password chars=ascii_letters') }}" -nextcloud_mariadb_root_password: "{{ lookup('password', './secrets/nextcloud_mariadb_root_password chars=ascii_letters') }}" -collabora_password: "{{ lookup('password', './secrets/collabora_admin_password chars=ascii_letters') }}" -grafana_admin_password: "{{ lookup('password', './secrets/grafana_admin_password chars=ascii_letters') }}" +nextcloud_password: "{{ lookup('password', './cluster_data/secrets/nextcloud_admin_password chars=ascii_letters') }}" +nextcloud_mariadb_password: "{{ lookup('password', './cluster_data/secrets/nextcloud_mariadb_password chars=ascii_letters') }}" +nextcloud_mariadb_root_password: "{{ lookup('password', './cluster_data/secrets/nextcloud_mariadb_root_password chars=ascii_letters') }}" +collabora_password: "{{ lookup('password', './cluster_data/secrets/collabora_admin_password chars=ascii_letters') }}" +grafana_admin_password: "{{ lookup('password', './cluster_data/secrets/grafana_admin_password chars=ascii_letters') }}" # git repo versions git_helmfiles_version: '6c5b62376e8ca8cd8789ece716e91ad0693e6f9f' diff --git a/ansible/roles/setup/tasks/rke.yml b/ansible/roles/setup/tasks/rke.yml index e822ba0a1d4a44813b98ec81280b2f4d6a565bcb..287ead2a1c901cc2af43af9ab2c1b619cacafe8e 100644 --- a/ansible/roles/setup/tasks/rke.yml +++ b/ansible/roles/setup/tasks/rke.yml @@ -4,15 +4,6 @@ - rke shell: /usr/local/bin/rke up --config=/oas/control/local/rke/cluster.yml >> /oas/logs/rke.log -- name: Fetch /oas/logs/rke.log from cluster - tags: - - log - - rke - fetch: - src: /oas/logs/rke.log - dest: ./rke.log - flat: yes - - name: Ensure /root/.kube directory tags: - rke @@ -30,10 +21,19 @@ src: /oas/control/local/rke/kube_config_cluster.yml dest: /root/.kube/config -- name: Copy kubectl config to local host +- name: Copy cluster information to local folder tags: + - fetch + - rke - kubectl fetch: - src: /oas/control/local/rke/kube_config_cluster.yml - dest: cluster_data/kubectl.cfg + src: "{{ item.src }}" + dest: cluster_data/{{ item.dest }} flat: yes + loop: + - src: /oas/control/local/rke/kube_config_cluster.yml + dest: kube_config_cluster.yml + - src: /oas/logs/rke.log + dest: rke.log + - src: /oas/control/local/rke/cluster.yml + dest: rke_cluster.yml