Skip to content
This repository was archived by the owner on Aug 9, 2022. It is now read-only.

Commit 26579ba

Browse files
committed
Update README.md
1 parent cfb8e04 commit 26579ba

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff 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
9391
You can then run `ansible-playbook nginx_controller_agent.yaml` to execute the playbook.

0 commit comments

Comments
 (0)