review: added changes discussed with fgrz

master
Sven Ketelsen 4 years ago
parent 45a6d3c90b
commit 4b74d64949

@ -1,7 +1,7 @@
--- ---
- name: 'apply kubernetes setup to {{ host | default("all") }}' - name: 'apply kubernetes setup to {{ host | default("all") }}'
hosts: '{{ host | default("k8s_cluster") }}' hosts: '{{ host | default("kube_control_plane") }}'
serial: "{{ serial_number | default(10) }}" serial: "{{ serial_number | default(10) }}"
pre_tasks: pre_tasks:

@ -96,7 +96,6 @@
- name: "Create json object for <Machine> credentials <hetzner-ansible-ssh>" - name: "Create json object for <Machine> credentials <hetzner-ansible-ssh>"
vars: vars:
name: "hetzner-ansible-ssh" name: "hetzner-ansible-ssh"
user_id: "{{ ansible_awx_user_id }}"
credential_type_id: "{{ awx_credential_type_machine_id }}" credential_type_id: "{{ awx_credential_type_machine_id }}"
credential_type_name: "Machine" credential_type_name: "Machine"
username: "Ansible" username: "Ansible"
@ -244,7 +243,6 @@
delegate_to: localhost delegate_to: localhost
vars: vars:
name: "hetzner-ansible-vault" name: "hetzner-ansible-vault"
user_id: "{{ ansible_awx_user_id }}"
credential_type_id: "{{ awx_credential_type_vault_id }}" credential_type_id: "{{ awx_credential_type_vault_id }}"
credential_type_name: "Vault" credential_type_name: "Vault"
vault_password: "{{ ansible_vault_password }}" vault_password: "{{ ansible_vault_password }}"
@ -310,7 +308,6 @@
vars: vars:
name: "{{ shared_service_harbor_hostname }}" name: "{{ shared_service_harbor_hostname }}"
description: "{{ shared_service_harbor_hostname }}" description: "{{ shared_service_harbor_hostname }}"
user_id: "{{ ansible_awx_user_id }}"
credential_type_id: "{{ awx_credential_type_container_registry_id }}" credential_type_id: "{{ awx_credential_type_container_registry_id }}"
credential_type_name: "Container Registry" credential_type_name: "Container Registry"
host: "{{ shared_service_harbor_hostname }}" host: "{{ shared_service_harbor_hostname }}"

@ -41,6 +41,8 @@
- name: "Define some VARs" - name: "Define some VARs"
set_fact: set_fact:
awx_admin_password: '{{ ( awx_admin_creds.resources | first ).data.password | b64decode }}' awx_admin_password: '{{ ( awx_admin_creds.resources | first ).data.password | b64decode }}'
when:
- inventory_hostname == groups['kube_control_plane'][0]
tags: tags:
- awx - awx

@ -2,8 +2,8 @@
"name": "{{ name }}", "name": "{{ name }}",
"description": "{{ description | default("") }}", "description": "{{ description | default("") }}",
"organization": "{{ organization_id | default(None) }}", "organization": "{{ organization_id | default(None) }}",
{% if user_id is defined %} {% if ansible_awx_user_id is defined %}
"user": "{{ user_id }}", "user": "{{ ansible_awx_user_id }}",
{% endif %} {% endif %}
{% if team_id is defined %} {% if team_id is defined %}
"team": "{{ team_id }}", "team": "{{ team_id }}",

@ -10,7 +10,7 @@
loop: loop:
- python3-pip=20.0.2-5ubuntu1.6 - python3-pip=20.0.2-5ubuntu1.6
when: when:
- inventory_hostname == groups['kube_control_plane'][0] - inventory_hostname == groups['kube_control_plane']
tags: tags:
- base - base
@ -32,7 +32,7 @@
loop: loop:
- https://github.com/databus23/helm-diff - https://github.com/databus23/helm-diff
when: when:
- inventory_hostname == groups['kube_control_plane'][0] - inventory_hostname == groups['kube_control_plane']
tags: tags:
- base - base
@ -41,7 +41,7 @@
url: 'https://github.com/derailed/k9s/releases/download/{{ kubernetes_tools_k9s_version | default("v0.25.18") }}/k9s_Linux_x86_64.tar.gz' url: 'https://github.com/derailed/k9s/releases/download/{{ kubernetes_tools_k9s_version | default("v0.25.18") }}/k9s_Linux_x86_64.tar.gz'
dest: '/tmp/k9s_Linux_x86_64_{{ kubernetes_tools_k9s_version | default("v0.25.18") }}.tar.gz' dest: '/tmp/k9s_Linux_x86_64_{{ kubernetes_tools_k9s_version | default("v0.25.18") }}.tar.gz'
when: when:
- inventory_hostname == groups['kube_control_plane'][0] - inventory_hostname == groups['kube_control_plane']
tags: tags:
- base - base
@ -51,7 +51,7 @@
dest: "/tmp/" dest: "/tmp/"
remote_src: yes remote_src: yes
when: when:
- inventory_hostname == groups['kube_control_plane'][0] - inventory_hostname == groups['kube_control_plane']
tags: tags:
- base - base
@ -65,6 +65,6 @@
remote_src: yes remote_src: yes
become: yes become: yes
when: when:
- inventory_hostname == groups['kube_control_plane'][0] - inventory_hostname == groups['kube_control_plane']
tags: tags:
- base - base

Loading…
Cancel
Save