This repository was archived by the owner on Aug 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -48,24 +48,24 @@ To use this role you can create a playbook such as the following:
4848
4949 tasks :
5050 - include_role :
51- name : nginxinc.nginx_controller_generate_token
51+ name : nginxinc.nginx_controller. nginx_controller_generate_token
5252
5353 - name : Get controller api key for agent registration
5454 uri :
55- url : " https://{{nginx_controller_fqdn}}/api/v1/platform/global"
55+ url : " https://{{ nginx_controller_fqdn }}/api/v1/platform/global"
5656 method : " GET"
5757 return_content : yes
5858 status_code : 200
5959 validate_certs : false
6060 headers :
6161 Cookie : " {{nginx_controller_auth_token}}"
62- register : nginx_controller_globals
62+ register : ctrl_globals
6363
6464 - name : Copy api_key to a variable
6565 set_fact :
66- nginx_controller_api_key : " {{nginx_controller_globals .json.currentStatus.agentSettings.apiKey}}"
66+ api_key : " {{ctrl_globals .json.currentStatus.agentSettings.apiKey}}"
6767
68- - hosts : loadbalancers
68+ - hosts : tag_new_gateway
6969 remote_user : ubuntu
7070 become : true
7171 become_method : sudo
@@ -83,11 +83,9 @@ To use this role you can create a playbook such as the following:
8383
8484 - name : install the agent
8585 include_role :
86- name : nginxinc.nginx_controller_agent
86+ name : nginxinc.nginx_controller. nginx_controller_agent
8787 vars :
88- nginx_controller_hostname : " {{ ansible_facts['fqdn'] }}"
89- # instance_name: "{{ ansible_facts['fqdn'] }}"
90- # location:
88+ nginx_controller_api_key : " {{ hostvars['localhost']['api_key'] }}"
9189` ` `
9290
9391You can then run ` ansible-playbook nginx_controller_agent.yaml` to execute the playbook.
You can’t perform that action at this time.
0 commit comments