@@ -134,7 +134,7 @@ suites:
134134 echo "<%= ENV['OP_SERVICE_ACCOUNT_TOKEN'] % >" > /etc/cinc/op_service_account_token
135135 '
136136
137- - name : connect-server
137+ - name : connect-server-cinc
138138 named_run_list : boxcutter_onepassword_test_connect_server
139139 verifier :
140140 inspec_tests :
@@ -152,12 +152,34 @@ suites:
152152 # export OP_CONNECT_HOST=http://localhost:8080
153153 pre_converge :
154154 - remote : |
155- bash -xc '
156- set +x
155+ bash -c '
157156 mkdir -p /etc/cinc
158- ln -s /etc/cinc /etc/chef
157+ echo "<%= ENV['OP_CONNECT_HOST'] % >" > /etc/cinc/op_connect_host
158+ echo "<%= ENV['OP_CONNECT_TOKEN'] % >" > /etc/cinc/op_connect_token
159+ echo "<%= ENV['OP_SERVICE_ACCOUNT_TOKEN'] % >" > /etc/cinc/op_service_account_token
160+ '
161+
162+ - name : connect-server-chef
163+ named_run_list : boxcutter_onepassword_test_connect_server
164+ verifier :
165+ inspec_tests :
166+ - test/integration/cli
167+ attributes :
168+ lifecycle :
169+ # op item get 'Service Account Auth Token: automation-org-readonly-blue' --vault Automation-Org --account PB5KE5S2ORAQTDUOLBDJTLAPVU
170+ # op item get mzqlddelxv6oe7dfz3vc7iad7m --vault Automation-Org --account PB5KE5S2ORAQTDUOLBDJTLAPVU --format json
171+ # export OP_SERVICE_ACCOUNT_TOKEN=$(op read 'op://Automation-Org/mzqlddelxv6oe7dfz3vc7iad7m/credential' --account PB5KE5S2ORAQTDUOLBDJTLAPVU)
172+ #
173+ # op item get 'sandbox-connect-server Access Token: sandbox-rw-blue' --vault Automation-Org --account PB5KE5S2ORAQTDUOLBDJTLAPVU
174+ # op item get nuhhhrxxzz4cjmssx3226ejfzm --vault Automation-Org --account PB5KE5S2ORAQTDUOLBDJTLAPVU --format json
175+ # export OP_CONNECT_TOKEN=$(op read 'op://Automation-Org/nuhhhrxxzz4cjmssx3226ejfzm/credential' --account PB5KE5S2ORAQTDUOLBDJTLAPVU)
176+ #
177+ # export OP_CONNECT_HOST=http://localhost:8080
178+ pre_converge :
179+ - remote : |
180+ bash -c '
181+ mkdir -p /etc/chef
159182 echo "<%= ENV['OP_CONNECT_HOST'] % >" > /etc/chef/op_connect_host
160183 echo "<%= ENV['OP_CONNECT_TOKEN'] % >" > /etc/chef/op_connect_token
161184 echo "<%= ENV['OP_SERVICE_ACCOUNT_TOKEN'] % >" > /etc/chef/op_service_account_token
162- set -x
163- '
185+ '
0 commit comments