Resources
Answers
Examples
Sign in
Get Started
What do you want to save?
Add Code snippet
New code examples
Python
2022-02-02 17:41:50
Ansible playbook to set passwordless sudo
--- - hosts: all tasks: - lineinfile: path: /etc/sudoers state: present regexp: '^%sudo' line: '%sudo ALL=(ALL) NOPASSWD: ALL' validate: 'visudo -cf %s'
Add solution
TypeScript
2021-11-03 17:58:09
ansible hosts file update
--- - name: host file update - Local DNS setup across all the servers hosts: multi gather_facts: yes tasks: - name: Update the /etc/hosts file with node name tags: etchostsupdate become: yes become_user: root lin...
Add solution
Other
2021-09-15 17:42:02
lineinfile
# NOTE: Before 2.3, option 'dest', 'destfile' or 'name' was used instead of 'path' - name: Ensure SELinux is set to enforcing mode lineinfile: path: /etc/selinux/config regexp: '^SELINUX=' line: SELINUX=enforcing - name: Make sure group whe...
Add solution
Best helpers
daily
weekly
monthly
for 3 months
Tranquilled
+5
Kozuch
+5
The 313137
+5
Toby Stewart
+5
Moez
+5
Stelle
+5
Kathrin
+5
Moradnejad
+5
show more
This website uses cookies to make IQCode work for you. By using this site, you agree to our
cookie policy
Welcome Back!
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign in
E-mail
Password
Recover lost password
Log in
Or log in with
Not registered?
Sign up takes less than a minute
Create a Free Account
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign up
Email
Password
Sign up for free
Or sign up with
By signing up, you agree to the
Terms and Conditions
and
Privacy Policy
. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.