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

add from until options to deploy.py #445

Merged
merged 6 commits into from
Nov 20, 2023

Conversation

Yfkesmit
Copy link
Contributor

Fixes issue #402

help="Determine from which playbook to start the deploy from",
)
@click.option(
"--until", "until_playbook", help="Determine until which playbook to run the deploy"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is only one playbook but multiple roles. The text should be until which role (same for the --from option)

roles = roles[: roles.index(until_playbook) + 1]
from_until = True

final_roles = ",".join(roles)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you inline this variable? It is only used once at line 121

Copy link
Contributor

@HugoPeters1024 HugoPeters1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after 2 minor comments, the issue was right, I am very happy now :)

@@ -50,6 +65,8 @@ def deploy(
env["ANSIBLE_STDOUT_CALLBACK"] = "yaml"
env["ANSIBLE_VAULT_IDENTITY"] = host
env["ANSIBLE_SSH_PIPELINING"] = "true"
env["ANSIBLE_ROLES_PATH"] = "roles/"
Copy link
Contributor

@HugoPeters1024 HugoPeters1024 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually breaks when not using WSL. Could you either remove these changes or somehow make a resilient check to only execute this statements when running inside of WSL?

@HugoPeters1024
Copy link
Contributor

Fixing and merging this PR because we want to have these changes for upcoming tasks

@HugoPeters1024 HugoPeters1024 merged commit 1877e2a into master Nov 20, 2023
1 check failed
@HugoPeters1024 HugoPeters1024 deleted the deploy_from_until_closes_issue402 branch November 20, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Proposes (changes to) a feature review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy.py: make it possible to deploy from a certain role
3 participants