Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation assumes user is in deployment repository #33

Open
MattiSG opened this issue Mar 6, 2024 · 0 comments
Open

Documentation assumes user is in deployment repository #33

MattiSG opened this issue Mar 6, 2024 · 0 comments

Comments

@MattiSG
Copy link
Member

MattiSG commented Mar 6, 2024

The documentation currently assumes the user is in deployment repository, making it not obvious how to use the commands from a collection repository.

Below is my annotated and shortened log of trying to stop a collection operation:

# I try copy-pasting the command in the deployment doc
$ demo-declarations ⦑ 10:37:50 
› ansible-playbook opentermsarchive.deployment.engine.application --tags stop
ERROR! the playbook: opentermsarchive.deployment.engine.application could not be found

# I realise I have deployment v0.0.16 as dependency while I'm reading deployment doc for v0.1.1, I try updating the collection
$ demo-declarations ⦑ 10:38:24
› pull
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
[…]
Updating 178399d..e57cadb
 4 files changed, 76 insertions(+), 45 deletions(-)
$ demo-declarations ⦑ 10:39:09 
› ansible-playbook opentermsarchive.deployment.engine.application --tags stop
ERROR! the playbook: opentermsarchive.deployment.engine.application could not be found

# I read the deployment doc and copy-paste the dependencies installation command
$ demo-declarations ⦑ 10:39:12
› ansible-galaxy collection install -r requirements.yml
ERROR! The requirements file '/Users/opentermsarchive/Documents/demo-declarations/requirements.yml' does not exist.

# I read again and understand that the instructions assume that I am in the deployment repository and not in a collection, I adapt the command
$ demo-declarations ⦑ 10:40:24
› ansible-galaxy collection install -r deployment/requirements.yml
Starting galaxy collection install process
[…]
opentermsarchive.deployment:0.1.1 was installed successfully

$ demo-declarations ⦑ 10:40:49 
› ansible-playbook opentermsarchive.deployment.engine.application --tags stop
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[…]
PLAY RECAP **********************************************

$ demo-declarations ⦑ 10:40:54 
› ansible-playbook opentermsarchive.deployment.engine.application --tags stop --inventory deployment/inventory.yml 

PLAY [Deploy the Open Terms Archive engine] *************

TASK [Gathering Facts] **********************************
The authenticity of host '162.19.74.224 (162.19.74.224)' can’t be established.
ED25519 key fingerprint is SHA256:8htTt9rTJVw3p/N44saxIsU78O+7A7K+rzYMEgpxdWs.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
fatal: [162.19.74.224]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '162.19.74.224' (ED25519) to the list of known hosts.\r\ndebian@162.19.74.224: Permission denied (publickey,password).", "unreachable": true}

PLAY RECAP **********************************************

# I find on the internet the way to ask Ansible to use a specific key file
$ demo-declarations ⦑ 10:41:28
› ansible-playbook opentermsarchive.deployment.engine.application --tags stop --inventory deployment/inventory.yml --extra-vars="ansible_ssh_private_key_file=/Users/opentermsarchive/.ssh/demo-key"

PLAY [Deploy the Open Terms Archive engine] *************

TASK [Gathering Facts] **********************************
[…]

TASK [opentermsarchive.deployment.engine : Stop Open Terms Archive schedulers] **********
changed: [162.19.74.224]

PLAY RECAP ******************************************************************************

# success!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant