diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 89af156..649e261 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -629,8 +629,8 @@ jobs: # Optional, additional flags to pass to ansible-playbook options: | --extra-vars "@../defaults/main.yaml" - --extra-vars "nginx-one-f5xc-api-token=${{ secrets.NGINX_ONE_F5XC_API_TOKEN }}" - --extra-vars "nginx-one-f5xc-tenant=${{ secrets.NGINX_ONE_F5XC_TENANT }}" + --extra-vars "nginx_one_f5xc_api_token=${{ secrets.NGINX_ONE_F5XC_API_TOKEN }}" + --extra-vars "nginx_one_f5xc_tenant=${{ secrets.NGINX_ONE_F5XC_TENANT }}" --verbose -vvvv # Required, playbook filepath playbook: "nginx.yaml" diff --git a/nginx/ansible/configuration/config/azure-instances/nginx.tpl b/nginx/ansible/configuration/config/azure-instances/nginx.tpl index 8974902..3b8c108 100644 --- a/nginx/ansible/configuration/config/azure-instances/nginx.tpl +++ b/nginx/ansible/configuration/config/azure-instances/nginx.tpl @@ -7,13 +7,13 @@ "files": [ { "contents": "CnR5cGVzIHsKICAgIHRleHQvaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sIGh0bSBzaHRtbDsKICAgIHRleHQvY3NzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjc3M7CiAgICB0ZXh0L3htbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeG1sOwogICAgaW1hZ2UvZ2lmICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdpZjsKICAgIGltYWdlL2pwZWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqcGVnIGpwZzsKICAgIGFwcGxpY2F0aW9uL2phdmFzY3JpcHQgICAgICAgICAgICAgICAgICAgICAgICAgICBqczsKICAgIGFwcGxpY2F0aW9uL2F0b20reG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdG9tOwogICAgYXBwbGljYXRpb24vcnNzK3htbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJzczsKCiAgICB0ZXh0L21hdGhtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW1sOwogICAgdGV4dC9wbGFpbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR4dDsKICAgIHRleHQvdm5kLnN1bi5qMm1lLmFwcC1kZXNjcmlwdG9yICAgICAgICAgICAgICAgICBqYWQ7CiAgICB0ZXh0L3ZuZC53YXAud21sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd21sOwogICAgdGV4dC94LWNvbXBvbmVudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0YzsKCiAgICBpbWFnZS9hdmlmICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXZpZjsKICAgIGltYWdlL3BuZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbmc7CiAgICBpbWFnZS9zdmcreG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ZnIHN2Z3o7CiAgICBpbWFnZS90aWZmICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGlmIHRpZmY7CiAgICBpbWFnZS92bmQud2FwLndibXAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2JtcDsKICAgIGltYWdlL3dlYnAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ZWJwOwogICAgaW1hZ2UveC1pY29uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljbzsKICAgIGltYWdlL3gtam5nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqbmc7CiAgICBpbWFnZS94LW1zLWJtcCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm1wOwoKICAgIGZvbnQvd29mZiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b2ZmOwogICAgZm9udC93b2ZmMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdvZmYyOwoKICAgIGFwcGxpY2F0aW9uL2phdmEtYXJjaGl2ZSAgICAgICAgICAgICAgICAgICAgICAgICBqYXIgd2FyIGVhcjsKICAgIGFwcGxpY2F0aW9uL2pzb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uOwogICAgYXBwbGljYXRpb24vbWFjLWJpbmhleDQwICAgICAgICAgICAgICAgICAgICAgICAgIGhxeDsKICAgIGFwcGxpY2F0aW9uL21zd29yZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2M7CiAgICBhcHBsaWNhdGlvbi9wZGYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGRmOwogICAgYXBwbGljYXRpb24vcG9zdHNjcmlwdCAgICAgICAgICAgICAgICAgICAgICAgICAgIHBzIGVwcyBhaTsKICAgIGFwcGxpY2F0aW9uL3J0ZiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBydGY7CiAgICBhcHBsaWNhdGlvbi92bmQuYXBwbGUubXBlZ3VybCAgICAgICAgICAgICAgICAgICAgbTN1ODsKICAgIGFwcGxpY2F0aW9uL3ZuZC5nb29nbGUtZWFydGgua21sK3htbCAgICAgICAgICAgICBrbWw7CiAgICBhcHBsaWNhdGlvbi92bmQuZ29vZ2xlLWVhcnRoLmtteiAgICAgICAgICAgICAgICAga216OwogICAgYXBwbGljYXRpb24vdm5kLm1zLWV4Y2VsICAgICAgICAgICAgICAgICAgICAgICAgIHhsczsKICAgIGFwcGxpY2F0aW9uL3ZuZC5tcy1mb250b2JqZWN0ICAgICAgICAgICAgICAgICAgICBlb3Q7CiAgICBhcHBsaWNhdGlvbi92bmQubXMtcG93ZXJwb2ludCAgICAgICAgICAgICAgICAgICAgcHB0OwogICAgYXBwbGljYXRpb24vdm5kLm9hc2lzLm9wZW5kb2N1bWVudC5ncmFwaGljcyAgICAgIG9kZzsKICAgIGFwcGxpY2F0aW9uL3ZuZC5vYXNpcy5vcGVuZG9jdW1lbnQucHJlc2VudGF0aW9uICBvZHA7CiAgICBhcHBsaWNhdGlvbi92bmQub2FzaXMub3BlbmRvY3VtZW50LnNwcmVhZHNoZWV0ICAgb2RzOwogICAgYXBwbGljYXRpb24vdm5kLm9hc2lzLm9wZW5kb2N1bWVudC50ZXh0ICAgICAgICAgIG9kdDsKICAgIGFwcGxpY2F0aW9uL3ZuZC5vcGVueG1sZm9ybWF0cy1vZmZpY2Vkb2N1bWVudC5wcmVzZW50YXRpb25tbC5wcmVzZW50YXRpb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcHR4OwogICAgYXBwbGljYXRpb24vdm5kLm9wZW54bWxmb3JtYXRzLW9mZmljZWRvY3VtZW50LnNwcmVhZHNoZWV0bWwuc2hlZXQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4bHN4OwogICAgYXBwbGljYXRpb24vdm5kLm9wZW54bWxmb3JtYXRzLW9mZmljZWRvY3VtZW50LndvcmRwcm9jZXNzaW5nbWwuZG9jdW1lbnQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N4OwogICAgYXBwbGljYXRpb24vdm5kLndhcC53bWxjICAgICAgICAgICAgICAgICAgICAgICAgIHdtbGM7CiAgICBhcHBsaWNhdGlvbi93YXNtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2FzbTsKICAgIGFwcGxpY2F0aW9uL3gtN3otY29tcHJlc3NlZCAgICAgICAgICAgICAgICAgICAgICA3ejsKICAgIGFwcGxpY2F0aW9uL3gtY29jb2EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjY287CiAgICBhcHBsaWNhdGlvbi94LWphdmEtYXJjaGl2ZS1kaWZmICAgICAgICAgICAgICAgICAgamFyZGlmZjsKICAgIGFwcGxpY2F0aW9uL3gtamF2YS1qbmxwLWZpbGUgICAgICAgICAgICAgICAgICAgICBqbmxwOwogICAgYXBwbGljYXRpb24veC1tYWtlc2VsZiAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bjsKICAgIGFwcGxpY2F0aW9uL3gtcGVybCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbCBwbTsKICAgIGFwcGxpY2F0aW9uL3gtcGlsb3QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmMgcGRiOwogICAgYXBwbGljYXRpb24veC1yYXItY29tcHJlc3NlZCAgICAgICAgICAgICAgICAgICAgIHJhcjsKICAgIGFwcGxpY2F0aW9uL3gtcmVkaGF0LXBhY2thZ2UtbWFuYWdlciAgICAgICAgICAgICBycG07CiAgICBhcHBsaWNhdGlvbi94LXNlYSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VhOwogICAgYXBwbGljYXRpb24veC1zaG9ja3dhdmUtZmxhc2ggICAgICAgICAgICAgICAgICAgIHN3ZjsKICAgIGFwcGxpY2F0aW9uL3gtc3R1ZmZpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXQ7CiAgICBhcHBsaWNhdGlvbi94LXRjbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGNsIHRrOwogICAgYXBwbGljYXRpb24veC14NTA5LWNhLWNlcnQgICAgICAgICAgICAgICAgICAgICAgIGRlciBwZW0gY3J0OwogICAgYXBwbGljYXRpb24veC14cGluc3RhbGwgICAgICAgICAgICAgICAgICAgICAgICAgIHhwaTsKICAgIGFwcGxpY2F0aW9uL3hodG1sK3htbCAgICAgICAgICAgICAgICAgICAgICAgICAgICB4aHRtbDsKICAgIGFwcGxpY2F0aW9uL3hzcGYreG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4c3BmOwogICAgYXBwbGljYXRpb24vemlwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHppcDsKCiAgICBhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0gICAgICAgICAgICAgICAgICAgICAgICAgYmluIGV4ZSBkbGw7CiAgICBhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0gICAgICAgICAgICAgICAgICAgICAgICAgZGViOwogICAgYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtICAgICAgICAgICAgICAgICAgICAgICAgIGRtZzsKICAgIGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbSAgICAgICAgICAgICAgICAgICAgICAgICBpc28gaW1nOwogICAgYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtICAgICAgICAgICAgICAgICAgICAgICAgIG1zaSBtc3AgbXNtOwoKICAgIGF1ZGlvL21pZGkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaWQgbWlkaSBrYXI7CiAgICBhdWRpby9tcGVnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXAzOwogICAgYXVkaW8vb2dnICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9nZzsKICAgIGF1ZGlvL3gtbTRhICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtNGE7CiAgICBhdWRpby94LXJlYWxhdWRpbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmE7CgogICAgdmlkZW8vM2dwcCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDNncHAgM2dwOwogICAgdmlkZW8vbXAydCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRzOwogICAgdmlkZW8vbXA0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1wNDsKICAgIHZpZGVvL21wZWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtcGVnIG1wZzsKICAgIHZpZGVvL3F1aWNrdGltZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb3Y7CiAgICB2aWRlby93ZWJtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2VibTsKICAgIHZpZGVvL3gtZmx2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbHY7CiAgICB2aWRlby94LW00diAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbTR2OwogICAgdmlkZW8veC1tbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1uZzsKICAgIHZpZGVvL3gtbXMtYXNmICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3ggYXNmOwogICAgdmlkZW8veC1tcy13bXYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdtdjsKICAgIHZpZGVvL3gtbXN2aWRlbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdmk7Cn0K", - "mtime": "{{ ansible_date_time.iso8601 }}", + "mtime": "{{ ansible_date_time }}", "name": "mime.types", "size": 5349 }, { "contents": "CnVzZXIgIG5naW54Owp3b3JrZXJfcHJvY2Vzc2VzICBhdXRvOwoKZXJyb3JfbG9nICAvdmFyL2xvZy9uZ2lueC9lcnJvci5sb2cgbm90aWNlOwpwaWQgICAgICAgIC92YXIvcnVuL25naW54LnBpZDsKCmxvYWRfbW9kdWxlIG1vZHVsZXMvbmd4X2h0dHBfYXBwX3Byb3RlY3RfbW9kdWxlLnNvOwoKZXZlbnRzIHsKICAgIHdvcmtlcl9jb25uZWN0aW9ucyAgMTAyNDsKfQoKCmh0dHAgewogICAgaW5jbHVkZSAgICAgICAvZXRjL25naW54L21pbWUudHlwZXM7CiAgICBkZWZhdWx0X3R5cGUgIGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbTsKCiAgICBsb2dfZm9ybWF0ICBtYWluICAnJHJlbW90ZV9hZGRyIC0gJHJlbW90ZV91c2VyIFskdGltZV9sb2NhbF0gIiRyZXF1ZXN0IiAnCiAgICAgICAgICAgICAgICAgICAgICAnJHN0YXR1cyAkYm9keV9ieXRlc19zZW50ICIkaHR0cF9yZWZlcmVyIiAnCiAgICAgICAgICAgICAgICAgICAgICAnIiRodHRwX3VzZXJfYWdlbnQiICIkaHR0cF94X2ZvcndhcmRlZF9mb3IiJzsKCiAgICBhY2Nlc3NfbG9nICAvdmFyL2xvZy9uZ2lueC9hY2Nlc3MubG9nICBtYWluOwoKICAgIHNlbmRmaWxlICAgICAgICBvbjsKICAgICN0Y3Bfbm9wdXNoICAgICBvbjsKCiAgICBrZWVwYWxpdmVfdGltZW91dCAgNjU7CgogICAgI2d6aXAgIG9uOwoKICAgIGluY2x1ZGUgL2V0Yy9uZ2lueC9jb25mLmQvKi5jb25mOwogICAgaW5jbHVkZSAvZXRjL25naW54L3NpdGVzL25naW54LWNhbGFsYW5nLW5ldC8qLmNvbmY7Cn0KCgojIFRDUC9VRFAgcHJveHkgYW5kIGxvYWQgYmFsYW5jaW5nIGJsb2NrCiMKI3N0cmVhbSB7CiAgICAjIEV4YW1wbGUgY29uZmlndXJhdGlvbiBmb3IgVENQIGxvYWQgYmFsYW5jaW5nCgogICAgI3Vwc3RyZWFtIHN0cmVhbV9iYWNrZW5kIHsKICAgICMgICAgem9uZSB0Y3Bfc2VydmVycyA2NGs7CiAgICAjICAgIHNlcnZlciBiYWNrZW5kMS5leGFtcGxlLmNvbToxMjM0NTsKICAgICMgICAgc2VydmVyIGJhY2tlbmQyLmV4YW1wbGUuY29tOjEyMzQ1OwogICAgI30KCiAgICAjc2VydmVyIHsKICAgICMgICAgbGlzdGVuIDEyMzQ1OwogICAgIyAgICBzdGF0dXNfem9uZSB0Y3Bfc2VydmVyOwogICAgIyAgICBwcm94eV9wYXNzIHN0cmVhbV9iYWNrZW5kOwogICAgI30KI30K", - "mtime": "{{ ansible_date_time.iso8601 }}", + "mtime": "{{ ansible_date_time }}", "name": "nginx.conf", "size": 1137 } @@ -24,7 +24,7 @@ "files": [ { "contents": "c2VydmVyIHsKICAgIGxpc3RlbiAgICAgICA4MCBkZWZhdWx0X3NlcnZlcjsKICAgIHNlcnZlcl9uYW1lICBsb2NhbGhvc3Q7CgogICAgI2FjY2Vzc19sb2cgIC92YXIvbG9nL25naW54L2hvc3QuYWNjZXNzLmxvZyAgbWFpbjsKCiAgICBsb2NhdGlvbiAvIHsKICAgICAgICByb290ICAgL3Vzci9zaGFyZS9uZ2lueC9odG1sOwogICAgICAgIGluZGV4ICBpbmRleC5odG1sIGluZGV4Lmh0bTsKICAgIH0KCiAgICBlcnJvcl9wYWdlICA0MDQgICAgICAgICAgICAgIC80MDQuaHRtbDsKCiAgICAjIHJlZGlyZWN0IHNlcnZlciBlcnJvciBwYWdlcyB0byB0aGUgc3RhdGljIHBhZ2UgLzUweC5odG1sCiAgICAKICAgIGVycm9yX3BhZ2UgICA1MDAgNTAyIDUwMyA1MDQgIC81MHguaHRtbDsKICAgIGxvY2F0aW9uID0gLzUweC5odG1sIHsKICAgICAgICByb290ICAgL3Vzci9zaGFyZS9uZ2lueC9odG1sOwogICAgfQoKICAgICMgcHJveHkgdGhlIFBIUCBzY3JpcHRzIHRvIEFwYWNoZSBsaXN0ZW5pbmcgb24gMTI3LjAuMC4xOjgwCiAgICAjCiAgICAjbG9jYXRpb24gfiBcLnBocCQgewogICAgIyAgICBwcm94eV9wYXNzICAgaHR0cDovLzEyNy4wLjAuMTsKICAgICN9CgogICAgIyBwYXNzIHRoZSBQSFAgc2NyaXB0cyB0byBGYXN0Q0dJIHNlcnZlciBsaXN0ZW5pbmcgb24gMTI3LjAuMC4xOjkwMDAKICAgICMKICAgICNsb2NhdGlvbiB+IFwucGhwJCB7CiAgICAjICAgIHJvb3QgICAgICAgICAgIGh0bWw7CiAgICAjICAgIGZhc3RjZ2lfcGFzcyAgIDEyNy4wLjAuMTo5MDAwOwogICAgIyAgICBmYXN0Y2dpX2luZGV4ICBpbmRleC5waHA7CiAgICAjICAgIGZhc3RjZ2lfcGFyYW0gIFNDUklQVF9GSUxFTkFNRSAgL3NjcmlwdHMkZmFzdGNnaV9zY3JpcHRfbmFtZTsKICAgICMgICAgaW5jbHVkZSAgICAgICAgZmFzdGNnaV9wYXJhbXM7CiAgICAjfQoKICAgICMgZGVueSBhY2Nlc3MgdG8gLmh0YWNjZXNzIGZpbGVzLCBpZiBBcGFjaGUncyBkb2N1bWVudCByb290CiAgICAjIGNvbmN1cnMgd2l0aCBuZ2lueCdzIG9uZQogICAgIwogICAgI2xvY2F0aW9uIH4gL1wuaHQgewogICAgIyAgICBkZW55ICBhbGw7CiAgICAjfQoKICAgICMgZW5hYmxlIC9hcGkvIGxvY2F0aW9uIHdpdGggYXBwcm9wcmlhdGUgYWNjZXNzIGNvbnRyb2wgaW4gb3JkZXIKICAgICMgdG8gbWFrZSB1c2Ugb2YgTkdJTlggUGx1cyBBUEkKICAgIAogICAgbG9jYXRpb24gL2FwaS8gewogICAgICAgIGFwaSB3cml0ZT1vbjsKICAgICAgICBhbGxvdyAxMjcuMC4wLjE7CiAgICAgICAgZGVueSBhbGw7CiAgICB9CgogICAgIyBlbmFibGUgTkdJTlggUGx1cyBEYXNoYm9hcmQ7IHJlcXVpcmVzIC9hcGkvIGxvY2F0aW9uIHRvIGJlCiAgICAjIGVuYWJsZWQgYW5kIGFwcHJvcHJpYXRlIGFjY2VzcyBjb250cm9sIGZvciByZW1vdGUgYWNjZXNzCiAgICAjCiAgICAjbG9jYXRpb24gPSAvZGFzaGJvYXJkLmh0bWwgewogICAgIyAgICByb290IC91c3Ivc2hhcmUvbmdpbngvaHRtbDsKICAgICN9Cn0K", - "mtime": "{{ ansible_date_time.iso8601 }}", + "mtime": "{{ ansible_date_time }}", "name": "default.conf", "size": 1500 } @@ -35,19 +35,19 @@ "files": [ { "contents": "bWFwICRodHRwX2FwaWtleSAkYXBpX2NsaWVudF9uYW1lIHsKICAgIGRlZmF1bHQgIiI7CgogICAgIjdCNXpJcW1SR1htckpURm1LYTk5dmNpdCIgImpvbiI7CiAgICAiUXpWVjZ5MUVtUUZiYnhPZlJDd3lKczM1IiAibGluZHNheSI7CiAgICAibUdjakg4RnY2VTl5M0JWRjlIM1lwYjlUIiAicm9yeSI7CiAgICAiRXRkTWJNTEZwSDRuZzU3bllNZUVVV3E3QlFjYzVKa3FoZE5EIiAiaGFycmlzb24iOwp9", - "mtime": "{{ ansible_date_time.iso8601 }}", + "mtime": "{{ ansible_date_time }}", "name": "api_keys.conf", "size": 228 }, { "contents": "eyJrZXlzIjoKICAgIFt7CiAgICAgICAgImsiOiJabUZ1ZEdGemRHbGphbmQwIiwKICAgICAgICAia3R5Ijoib2N0IiwKICAgICAgICAia2lkIjoiMDAwMSIKICAgIH1dCn0=", - "mtime": "{{ ansible_date_time.iso8601 }}", + "mtime": "{{ ansible_date_time }}", "name": "api_secret.jwk", "size": 98 }, { "contents": "cmVzb2x2ZXIgMS4xLjEuMSB2YWxpZD0xMHMgaXB2Nj1vZmY7Cgp1cHN0cmVhbSBuZ2lueC1vcmcgewogICAgem9uZSBuZ2lueC1vcmcgNjRrOwogICAgc2VydmVyIG5naW54Lm9yZyByZXNvbHZlIG1heF9mYWlscz0zOwp9Cgp1cHN0cmVhbSBmNXhjLWRpc2NvdmVyeS1sYiB7CiAgICB6b25lIGY1eGMtZGlzY292ZXJ5LWxiIDY0azsKICAgIHNlcnZlciBkaXNjb3ZlcnkuY2FsYWxhbmcubmV0OjQ0MyByZXNvbHZlIG1heF9mYWlscz0zOwp9CgpzZXJ2ZXIgewogICAgbGlzdGVuICAgICAgICAgICAgICA4MDsKICAgIHNlcnZlcl9uYW1lICAgICAgICAgbmdpbnguY2FsYWxhbmcubmV0OwogICAgIyBTZW5zaXRpdmUgc3RyaW5ncyBpbiBVUkkgICAgCiAgICBsb2NhdGlvbiB+KiAoc2Vuc2l0aXZlfHBpaXxwY2l8Y2ppcykgewogICAgICAgIHJldHVybiA0MDEgJ3NlbnNpdGl2ZSBzdHJpbmcgZm91bmQgaW4gcmVxdWVzdCc7CiAgICB9CiAgICAjIEFQSSBrZXkgdmFsaWRhdGlvbgogICAgbG9jYXRpb24gPSAvX3ZhbGlkYXRlX2FwaWtleSB7CiAgICAgICAgaW50ZXJuYWw7CgogICAgICAgIGlmICgkaHR0cF9hcGlrZXkgPSAiIikgewogICAgICAgICAgICByZXR1cm4gNDAxOyAjIFVuYXV0aG9yaXplZAogICAgICAgIH0KICAgICAgICBpZiAoJGFwaV9jbGllbnRfbmFtZSA9ICIiKSB7CiAgICAgICAgICAgIHJldHVybiA0MDM7ICMgRm9yYmlkZGVuCiAgICAgICAgfQoKICAgICAgICByZXR1cm4gMjA0OyAjIE9LIChubyBjb250ZW50KQogICAgfQogICAgIyBBUEkga2V5IGF1dGhvcml6YXRpb24gbG9jYXRpb24KICAgIGxvY2F0aW9uID0gL2FwaWtleSB7CiAgICAgICAgcHJveHlfcGFzcyBodHRwOi8vbmdpbngtb3JnOwogICAgICAgIHByb3h5X3NldF9oZWFkZXIgSG9zdCBuZ2lueC5vcmc7CiAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLVJlYWwtSVAgJHJlbW90ZV9hZGRyOwogICAgICAgIHByb3h5X3NldF9oZWFkZXIgWC1Gb3J3YXJkZWQtRm9yICRwcm94eV9hZGRfeF9mb3J3YXJkZWRfZm9yOwogICAgICAgIGF1dGhfcmVxdWVzdCAvX3ZhbGlkYXRlX2FwaWtleTsKICAgIH0KICAgICMgSldUIGF1dGhvcml6YXRpb24gbG9jYXRpb24KICAgIGxvY2F0aW9uID0gL2p3dCB7CiAgICAgICAgcHJveHlfcGFzcyBodHRwOi8vbmdpbngtb3JnOwogICAgICAgIHByb3h5X3NldF9oZWFkZXIgSG9zdCBuZ2lueC5vcmc7CiAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLVJlYWwtSVAgJHJlbW90ZV9hZGRyOwogICAgICAgIHByb3h5X3NldF9oZWFkZXIgWC1Gb3J3YXJkZWQtRm9yICRwcm94eV9hZGRfeF9mb3J3YXJkZWRfZm9yOwogICAgICAgIGF1dGhfand0ICJBUEkiOwogICAgICAgIGF1dGhfand0X2tleV9maWxlIC9ldGMvbmdpbngvc2l0ZXMvbmdpbngtY2FsYWxhbmctbmV0L2FwaV9zZWNyZXQuandrOwogICAgfQogICAgIyByZWdleCByb290IGxvY2F0aW9uCiAgICBsb2NhdGlvbiB+KiAvIHsKICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9uZ2lueC1vcmc7CiAgICAgICAgcHJveHlfc2V0X2hlYWRlciBIb3N0IG5naW54Lm9yZzsKICAgICAgICBwcm94eV9zZXRfaGVhZGVyIFgtUmVhbC1JUCAkcmVtb3RlX2FkZHI7CiAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLUZvcndhcmRlZC1Gb3IgJHByb3h5X2FkZF94X2ZvcndhcmRlZF9mb3I7CiAgICAgICAgbWlycm9yIC9taXJyb3I7CiAgICAgICAgbWlycm9yX3JlcXVlc3RfYm9keSBvbjsKICAgIH0KICAgICMgbWlycm9yIHRyYWZmaWMgdG8gRjVYQwogICAgbG9jYXRpb24gPSAvbWlycm9yIHsKICAgICAgICBpbnRlcm5hbDsKICAgICAgICAKICAgICAgICBwcm94eV9zc2xfc2VydmVyX25hbWUgb247CiAgICAgICAgcHJveHlfc3NsX25hbWUgZGlzY292ZXJ5LmNhbGFsYW5nLm5ldDsKICAgICAgICBwcm94eV9wYXNzIGh0dHBzOi8vZjV4Yy1kaXNjb3ZlcnktbGIkcmVxdWVzdF91cmk7CiAgICAgICAgcHJveHlfc2V0X2hlYWRlciBIb3N0IGRpc2NvdmVyeS5jYWxhbGFuZy5uZXQ7CiAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLVNFUlZFUi1QT1JUICRzZXJ2ZXJfcG9ydDsKICAgICAgICBwcm94eV9zZXRfaGVhZGVyIFgtU0VSVkVSLUFERFIgJHNlcnZlcl9hZGRyOwogICAgICAgIHByb3h5X3NldF9oZWFkZXIgWC1SRUFMLUlQICRyZW1vdGVfYWRkcjsKICAgIH0KfQ==", - "mtime": "{{ ansible_date_time.iso8601 }}", + "mtime": "{{ ansible_date_time }}", "name": "nginx-calalang-net.conf", "size": 2164 } diff --git a/nginx/ansible/configuration/defaults/main.yaml b/nginx/ansible/configuration/defaults/main.yaml index e0671f6..e158693 100644 --- a/nginx/ansible/configuration/defaults/main.yaml +++ b/nginx/ansible/configuration/defaults/main.yaml @@ -4,5 +4,9 @@ state: "present" #state: 'absent' +# Ansible Date Time +ansible_date_time: "{{ lookup('pipe', 'date +%Y-%m-%d.%H:%M:%S') }}" + # List of NGINX One Instance IDs -azure_instances: [inst_jI92KpLMSSuqDyDmSvyU0A] +azure_instances: + - instance: inst_jI92KpLMSSuqDyDmSvyU0A \ No newline at end of file diff --git a/nginx/ansible/configuration/roles/nginx/tasks/main.yaml b/nginx/ansible/configuration/roles/nginx/tasks/main.yaml index 27b15cb..e1bbb87 100644 --- a/nginx/ansible/configuration/roles/nginx/tasks/main.yaml +++ b/nginx/ansible/configuration/roles/nginx/tasks/main.yaml @@ -6,9 +6,9 @@ delegate_to: localhost uri: headers: - Authorization: "{{ nginx-one-f5xc-api-token }}" + Authorization: "{{ nginx_one_f5xc_api_token }}" method: GET - url: "https://{{ nginx-one-f5xc-tenant }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances/summary" + url: "https://{{ nginx_one_f5xc_tenant }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances/summary" status_code: 200 validate_certs: yes register: nginx_one_instances_summary_response @@ -28,15 +28,14 @@ body: "{{ lookup('ansible.builtin.file','../config/azure-instances/nginx.json') }}" body_format: json headers: - Authorization: "{{ nginx-one-f5xc-api-token }}" + Authorization: "{{ nginx_one_f5xc_api_token }}" method: PUT - url: "https://{{ nginx-one-f5xc-tenant }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances/{{ item }}/config" + url: "https://{{ nginx_one_f5xc_tenant }}.console.ves.volterra.io/api/nginx/one/namespaces/default/instances/{{ item.instance }}/config" status_code: [200, 202] validate_certs: yes register: nginx_one_instance_group_put_response retries: 30 delay: 5 - until: "(result.status == 200) or (result.status == 202)" with_items: - - azure_instances + - "{{ azure_instances }}" when: state == "present"