@@ -38,7 +38,7 @@ Before getting started, the following tools need to be installed:
3838
3939## Set up a development environment
4040
41- The ` dev ` directory contains a ` docker-compose ` file which creates a development
41+ The ` dev ` directory contains a ` docker-compose.yml ` file which creates a development
4242environment :
4343- A Conjur Open Source instance
4444- An Ansible control node
@@ -142,28 +142,28 @@ Generate the master key, which will be used to encrypt Conjur's database. Store
142142this value as an environment variable.
143143
144144``` sh-session
145- docker- compose run --no-deps --rm conjur data-key generate > data_key
145+ docker compose run --no-deps --rm conjur data-key generate > data_key
146146export CONJUR_DATA_KEY="$(< data_key)"
147147```
148148
149149Start the Conjur OSS environment. An account, named ` cucumber ` , will be
150150automatically created.
151151
152152``` sh-session
153- docker- compose up -d conjur
153+ docker compose up -d conjur
154154```
155155
156156Retrieve the admin user's API key, and store the value in an environment variable.
157157
158158``` sh-session
159- export CLI_CONJUR_AUTHN_API_KEY="$(docker- compose exec conjur conjurctl role retrieve-key cucumber:user:admin)"
159+ export CLI_CONJUR_AUTHN_API_KEY="$(docker compose exec conjur conjurctl role retrieve-key cucumber:user:admin)"
160160```
161161
162162Start the Conjur CLI container. The CLI will be automatically authenticated as
163163the user ` cucumber:user:admin ` .
164164
165165``` sh-session
166- docker- compose up -d conjur_cli
166+ docker compose up -d conjur_cli
167167```
168168
169169## Load policy to set up Conjur Ansible integration
@@ -174,15 +174,15 @@ be a policy, a host, a user, a layer, a group, or a variable.
174174Check out the policy file, and load it into Conjur:
175175
176176``` sh-session
177- docker- compose exec conjur_cli cat /policy/root.yml
178- docker- compose exec conjur_cli conjur policy load root /policy/root.yml
177+ docker compose exec conjur_cli cat /policy/root.yml
178+ docker compose exec conjur_cli conjur policy load root /policy/root.yml
179179```
180180
181181Also, load a dummy secret value into the ` ansible/target-password ` variable.
182182This is a variable required by remote nodes in order to complete their workloads.
183183
184184``` sh-session
185- docker- compose exec conjur_cli conjur variable values add ansible/target-password S3cretV@lue
185+ docker compose exec conjur_cli conjur variable values add ansible/target-password S3cretV@lue
186186```
187187
188188## Create Ansible managed nodes
@@ -192,15 +192,15 @@ nodes. First, retrieve the API key for the Conjur host representing the control
192192node, then create it:
193193
194194``` sh-session
195- export ANSIBLE_CONJUR_AUTHN_API_KEY="$(docker- compose exec conjur conjurctl role retrieve-key cucumber:host:ansible/ansible-master)"
196- docker- compose up -d ansible
195+ export ANSIBLE_CONJUR_AUTHN_API_KEY="$(docker compose exec conjur conjurctl role retrieve-key cucumber:host:ansible/ansible-master)"
196+ docker compose up -d ansible
197197```
198198
199199Next, create two instances of each managed node:
200200
201201``` sh-session
202- docker- compose up -d --scale test_app_ubuntu=2 test_app_ubuntu
203- docker- compose up -d --scale test_app_centos=2 test_app_centos
202+ docker compose up -d --scale test_app_ubuntu=2 test_app_ubuntu
203+ docker compose up -d --scale test_app_centos=2 test_app_centos
204204```
205205
206206## Use Conjur Ansible Role to set up identity on managed nodes
@@ -209,13 +209,13 @@ To grant your Ansible host a Conjur identity, first install the Conjur
209209Collection on your Ansible control node:
210210
211211``` sh-session
212- docker- compose exec ansible ansible-galaxy collection install cyberark.conjur
212+ docker compose exec ansible ansible-galaxy collection install cyberark.conjur
213213```
214214
215215Set up the host factory token in the HFTOKEN env var
216216
217217``` sh-session
218- export HFTOKEN="$(docker- compose exec conjur_cli conjur hostfactory tokens create ansible/ansible-factory | jq -r '.[0].token')"
218+ export HFTOKEN="$(docker compose exec conjur_cli conjur hostfactory tokens create ansible/ansible-factory | jq -r '.[0].token')"
219219```
220220
221221Once you've done this, you can configure each Ansible node with a Conjur
0 commit comments