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

[1.22] p.52: example with --become-user #223

mkrawczuk opened this issue Mar 26, 2020 · 2 comments

[1.22] p.52: example with --become-user #223

mkrawczuk opened this issue Mar 26, 2020 · 2 comments


Copy link

@mkrawczuk mkrawczuk commented Mar 26, 2020

The -U shorthand for the --become-user argument is not recognized:

$ ansible-playbook -U johndoe playbook.yml
usage: ansible-playbook [-h] [--version] [-v] [-k]
                        [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER]
                        [-c CONNECTION] [-T TIMEOUT]
                        [--ssh-common-args SSH_COMMON_ARGS]
                        [--sftp-extra-args SFTP_EXTRA_ARGS]
                        [--scp-extra-args SCP_EXTRA_ARGS]
                        [--ssh-extra-args SSH_EXTRA_ARGS] [--force-handlers]
                        [--flush-cache] [-b] [--become-method BECOME_METHOD]
                        [--become-user BECOME_USER] [-K] [-t TAGS]
                        [--skip-tags SKIP_TAGS] [-C] [--syntax-check] [-D]
                        [-i INVENTORY] [--list-hosts] [-l SUBSET]
                        [-e EXTRA_VARS] [--vault-id VAULT_IDS]
                        [--ask-vault-pass | --vault-password-file VAULT_PASSWORD_FILES]
                        [-f FORKS] [-M MODULE_PATH] [--list-tasks]
                        [--list-tags] [--step] [--start-at-task START_AT_TASK]
                        playbook [playbook ...]
ansible-playbook: error: unrecognized arguments: -U
$ ansible-playbook --version
ansible-playbook 2.9.6

Seems like it has been removed. I will look through the release notes in spare time.

Copy link
Contributor Author

@mkrawczuk mkrawczuk commented Mar 26, 2020

By the way - have you considered putting the book's source into github, so that ready fixes would be proposed right away in form of PRs?

Copy link

@geerlingguy geerlingguy commented May 13, 2020

@mkrawczuk - Yeah it looks like that was stripped out in this commit (ansible/ansible@445ff39) from Feb 2019. Good catch! I'll have this updated in version 1.23, coming soon!

At this point, I'm still keeping the source manuscript repo private because there's a lot of other stuff in it for the full book build, including many proprietary assets that I'm not sure I could put under an open source or CC license.

But at some point it's an option I'm considering exploring. Thanks again for posting these issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants