From 5a02ce58ba2701d3ac88516fd6cf40d4c9d89c3e Mon Sep 17 00:00:00 2001 From: Dale Anderson Date: Thu, 25 Feb 2021 01:16:07 -0800 Subject: [PATCH] Replace wired example names with variables --- ...-loadbalancer-controller-deployment.manifest.yaml | 2 +- tasks/eks-container-insights.task.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/k8s/loadbalancer-controller/eks-loadbalancer-controller-deployment.manifest.yaml b/k8s/loadbalancer-controller/eks-loadbalancer-controller-deployment.manifest.yaml index 62ed095..d46fc4a 100644 --- a/k8s/loadbalancer-controller/eks-loadbalancer-controller-deployment.manifest.yaml +++ b/k8s/loadbalancer-controller/eks-loadbalancer-controller-deployment.manifest.yaml @@ -483,7 +483,7 @@ spec: spec: containers: - args: - - --cluster-name=ansible-eks-testcluster + - --cluster-name={{ eksexample_clustername }} - --ingress-class=alb image: amazon/aws-alb-ingress-controller:v2.1.0 livenessProbe: diff --git a/tasks/eks-container-insights.task.yaml b/tasks/eks-container-insights.task.yaml index f406a73..8a51e0e 100644 --- a/tasks/eks-container-insights.task.yaml +++ b/tasks/eks-container-insights.task.yaml @@ -6,7 +6,7 @@ - name: create amazon-cloudwatch namespace delegate_to: "{{ EKSBastionInstancePublicIP }}" - community.kubernetes.k8s: + community.kubernetes.k8s: state: present definition: apiVersion: v1 @@ -14,10 +14,10 @@ metadata: name: amazon-cloudwatch -- name: get notegroups rolename +- name: get notegroups rolename delegate_to: "{{ EKSBastionInstancePublicIP }}" - shell: > - aws cloudformation describe-stack-resources --region {{ eksexample_region }} --stack-name eksctl-{{ eksexample_clustername }}-nodegroup-ansible-eks-testcluster-linux-nodes \ + shell: > + aws cloudformation describe-stack-resources --region {{ eksexample_region }} --stack-name eksctl-{{ eksexample_clustername }}-nodegroup-{{ eksexample_clustername }}-linux-nodes \ | jq -r '.StackResources[] | select(.ResourceType=="AWS::IAM::Role") | .PhysicalResourceId' register: eks_nodegroup_role_name @@ -37,7 +37,7 @@ state: present apply: yes definition: "{{ lookup('template', './k8s/container-insights/eks-container-insights-{{ item }}.manifest.yaml') | from_yaml }}" - loop: + loop: - serviceaccount-cwagent - serviceaccount-fluentd - clusterrole-cwagent @@ -48,4 +48,4 @@ - configmap-clusterinfo - configmap-fluentdconfig - deamonset-cwagent - - deamonset-fluentd \ No newline at end of file + - deamonset-fluentd