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

tests: Templated "remote_user" provided as Ansible playbook keyword #1153

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

moreati
Copy link
Member

@moreati moreati commented Oct 9, 2024

The password is provided as a variable because there is no corresponding keyword. I get the impression that keywords are considered a legacy mechanism, so most (new) options are only overridable by variables.

The port is proved as a variable for now, to test remote_name in isolation.

refs #1040

The password is provided as a variable because there is no corresponding
keyword. I get the impression that keywords are considered a legacy mechanism,
so most (new) options are only overridable by variables.

The port is proved as a variable for now, to test remote_name in isolation.
@moreati moreati marked this pull request as ready for review October 9, 2024 12:39
@moreati
Copy link
Member Author

moreati commented Oct 9, 2024

PLAY [integration/ssh/templated_by_play_keyword.yml] ***************************

TASK [meta _raw_params=reset_connection] ***************************************
Wednesday 09 October 2024  12:32:10 +0000 (0:00:00.314)       0:01:43.953 ***** 

TASK [Templated variables in play keywords ] ***********************************
Wednesday 09 October 2024  12:32:10 +0000 (0:00:00.022)       0:01:43.975 ***** 
ok: [tt-bare]

@moreati moreati merged commit 825a84a into mitogen-hq:master Oct 9, 2024
48 checks passed
@moreati moreati deleted the issue1040 branch October 9, 2024 12:40
moreati added a commit to mordekasg/mitogen that referenced this pull request Oct 14, 2024
This reads the become username from the `become_user` attribute of the play
context, to the `"become_user"` option of the loaded become plugin. This has
been supported by vanilla Ansible since Ansible 2.10 (ansible-base 2.10).

To support this I've also switched from using the `play_context.become` (a
bool), to `connection.become` (an instance of the appropriate) become plugin.

New tests have been added, modelled on those for templated connection
parameters (see mitogen-hq#1147, mitogen-hq#1153, mitogen-hq#1159).

See
- ansible/ansible@480b106

refs mitogen-hq#1083

Co-authored-by: mordek <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant