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

Environment presets #1

Open
chavezdf opened this issue Jan 30, 2022 · 0 comments
Open

Environment presets #1

chavezdf opened this issue Jan 30, 2022 · 0 comments

Comments

@chavezdf
Copy link

Questions:
-It is important to know how control node and remote nodes are preset.
-All remote nodes should have the same root password? All these commands will been executed by root on remote hosts, because automation user has not been created yet. Does root user on remote nodes should be configured passwordless?
-Why you use sudo instead of using -u root -k?
-First you should add the inventory hosts in known_hosts, because always request validation, unless you deactivate this first. Did you?

sudo ansible all -m user -a "name=automation password={{ 'devops' | password_hash('sha512', 'salt')}}"
sudo ansible all -m authorized_key -a "key={{ lookup('file', '/home/automation/.ssh/id_rsa.pub') }} user=automation"
sudo ansible all -m copy -a 'content="automation ALL=(ALL) NOPASSWD:ALL" dest=/etc/sudoers.d/automation'

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