This repository was archived by the owner on Aug 9, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Expand file tree Collapse file tree 3 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 4141 path : " /install/controller-agent"
4242 httpResponse :
4343 statusCode : 200
44- body : " echo 'hello' "
44+ body : " mkdir /var/log/nginx-controller && touch /var/log/nginx-controller/agent.log "
4545
4646 status_code : 201
4747 body_format : json
Original file line number Diff line number Diff line change 2222- name : Verify File
2323 hosts : instances
2424 tasks :
25- - name : store the statistics of /etc/nginx/conf.d/nginx-plus-api.conf in the 'out ' variable
25+ - name : Store the statistics of /etc/nginx/conf.d/nginx-plus-api.conf in the 'conf_file ' variable
2626 stat :
2727 path : /etc/nginx/conf.d/nginx-plus-api.conf
28- register : out
28+ register : conf_file
2929
3030 - name : Ensure /etc/nginx/conf.d/nginx-plus-api.conf exists
3131 assert :
32- that : out.stat.exists == true
32+ that : conf_file.stat.exists == true
33+
34+ - name : Store the statistics of /var/log/nginx-controller/agent.log in the 'agent_log_file' variable
35+ stat :
36+ path : /var/log/nginx-controller/agent.log
37+ register : agent_log_file
38+
39+ - name : Ensure /var/log/nginx-controller/agent.log exists
40+ assert :
41+ that : agent_log_file.stat.exists == true
Original file line number Diff line number Diff line change 66 - nginx_controller_fqdn
77 - nginx_controller_api_key
88
9- - name : COPY files/nginx-plus-api.conf /etc/nginx/conf.d/ necessary for process monitoring.
9+ - name : Copy files/nginx-plus-api.conf to /etc/nginx/conf.d/ necessary for process monitoring
1010 copy :
1111 src : " files/nginx-plus-api.conf"
1212 dest : " /etc/nginx/conf.d/nginx-plus-api.conf"
1919 dest : " {{ ansible_env.HOME }}/install.sh"
2020 validate_certs : " {{ nginx_controller_validate_certs | default(false) }}"
2121 force : true
22+ changed_when : false
2223 register : nginx_controller_return
2324
2425- name : Run the NGINX Controller agent installer
3233 args :
3334 chdir : " {{ ansible_env.HOME }}"
3435 creates : /var/log/nginx-controller/agent.log
36+ changed_when : false
3537 register : nginx_controller_agent_install
3638
3739- name : Output agent install results
3840 debug :
3941 var : nginx_controller_agent_install.stdout_lines
4042
41- - name : remove the install script
43+ - name : Remove the install script
4244 file :
4345 path : " {{ ansible_env.HOME }}/install.sh"
4446 state : absent
47+ changed_when : false
You can’t perform that action at this time.
0 commit comments