Getting started with Ansible 13 - Adding Users & Bootstrapping



Ansible is an incredible configuration management and provisioning utility that enables you to automate all the things. In this series, you’ll learn everything you need to know in order to use Ansible for your day-to-day administration duties. In video 13, we’ll look at adding a user, and then we’ll set up Ansible to use a specific user for running tasks. Also, we’ll walk through creating a bootstrap playbook specifically for adding new nodes.

Full series:
Part 1 (Introduction): https://linux.video/ansible1
Part 2 (SSH Overview & Setup): https://linux.video/ansible2
Part 3 (Setting up the Git Repository): https://linux.video/ansible3
Part 4 (Running Commands): https://linux.video/ansible4
Part 5 (Running Elevated Commands): https://linux.video/ansible5
Part 6 (Writing our First Playbook): https://linux.video/ansible6
Part 7 (The ‘when’ Conditional): https://linux.video/ansible7
Part 8 (Improving your Playbook): https://linux.video/ansible8
Part 9 (Targeting Specific Nodes): https://linux.video/ansible9
Part 10 (Tags): https://linux.video/ansible10
Part 11 (Managing Files): https://linux.video/ansible11
Part 12 (Managing Services): https://linux.video/ansible12
Part 13 (Adding Users): This video
Part 14 (Roles): https://linux.video/ansible14
Part 15 (Host Variables): https://linux.video/ansible15
Part 16 (Templates): https://linux.video/ansible16

☁️ Get $100 in credit toward deploying your very own Linux servers on Linode!
➡️ http://linode.com/learnlinuxtv

🙌 Support me on Patreon and get early access to new content!
➡️ https://learnlinux.link/patron

Wiki article for this video:

Getting Started with Ansible 13 – Managing Users

🛒 Affiliate store for Linux compatible hardware/accessories (commission earned):
➡️ https://learnlinux.link/amazon

💻 Check out the Tiny Pilot KVM for your Homelab (commission earned):
➡️ https://learnlinux.link/tinypilot

💻 Check out Shells.com and spin up your very own Linux or Windows desktop in the cloud (commission earned):
➡️ https://learnlinux.link/shells

🐦 Follow me on Twitter!
➡️ https://learnlinux.link/twitter

💬 Official LearnLinux.tv Community:
➡️ https://community.learnlinux.tv

📖 Check out jay’s latest book, Mastering Ubuntu Server 3rd Edition. Available now!
➡️ https://ubuntuserverbook.com

👨 More about me:
➡️ https://www.jaylacroix.com
➡️ https://www.learnlinux.tv/about-me

💽 How to create a bootable flash drive for installing Linux:
➡️ https://linux.video/flash-usb

🐧 Which distro do I use?
➡️ https://learnlinux.link/mydistro

🔐 How to better secure OpenSSH:
➡️ https://linux.video/secure-ssh

☁️ How to create a cloud Linux server with Linode:
➡️ https://learnlinux.link/create-linode

#DevOps #Automation #Ansible

source

21 thoughts on “Getting started with Ansible 13 – Adding Users & Bootstrapping”
  1. on my Centos Stream 8 i was getting crazy with the following error:
    ERROR! couldn't resolve module/action 'authorized_key'. This often indicates a misspelling, missing collection, or incorrect module path.
    It turned out i was missing a collection.
    Fixed installing it:
    ansible-galaxy collection install ansible.posix

  2. very cool course thank you so very much. it was cool updating a couple of machines, but things started to stink when i had six. now i push one command and every server is done. what a time and pain saver! thank you again for taking the time to make this and all of your videos. you have taught me so much and i really appreciate it .

  3. Hi Jay, I have a question. When I build a Ubuntu VM or server I ofcourse create a linux user and I already pull down the SSH keys from github with the option in the installer. So I dont want to make an other user: simone for example but I want to use my already made user: user_example. Is this possible with the config you made?

  4. "0440 because we want to keep it locked down"
    As we give simone ALL=(ALL) NOPASSWD

    XD

    Just thought that was really funny. Thank you so much for putting this series together. It's excellent.

  5. I just read you can use the 'content:' argument to directly put sudoers content into the file. Just a one line change and doesn't require an external file.
    These tutorials are very helpful – thanks!

  6. Thanks for great videos!

    I have ran into a issue with the bootstrap playbook: When in your case the ansible.cfg has "remote_user" set to simone, Ansible will try to use that user when the bootstrap playbook is executed. But in fact the servers default user, such as root, ubuntu or whatever should be used for the bootstrap.
    This can be solved by adding the argument "-u default_user_on_server" to the ansible-playbook command.

  7. No matter what I do I get the following error when running bootstrap.yml:

    " FAILED! => {"changed": false, "msg": "Unsupported parameters for (apt) module: update Supported parameters include: allow_unauthenticated, autoclean, autoremove, cache_valid_time, deb, default_release, dpkg_options, force, force_apt_get, install_recommends, only_upgrade, package, policy_rc_d, purge, state, update_cache, upgrade"}"

  8. Good content but SOOO ANNOYING!
    It's "eS-Ewe(Doers)" – ie SUPER USER DO… – NOT SueDew!!! Uggh!

  9. Hey Jay, your videos are awesome!
    I wanted to let you know this video has the title card from Part 12.

  10. Wow Jay. You did an awesome effort to learn us Ansible. I really appreciate this. Amazing. Thank you so much.

  11. Hi Jay, after doing this several times, my "simone" user is not able to ssh into the server with no password. It keeps prompting me for the password. I'm running Centos 8. Do you know of any issues that might cause this?

  12. Thank you very much for this fantastic and very good explained playlist about ansible! I got it up and running with little confusions (ubuntu 20.04.1 does not really work with ansible_distribution variable, but 18.04.5 does!), but it is now running for nearly 15 virtual server under Proxmox and i am very happy about it 🙂 Thanks for your efforts and keep on doing this great job!

  13. what is best only have 1 BIG file with all the servers in (in my case around 140) or more files … we don't really got any servers with the same packages on ???

Leave a Reply

Your email address will not be published.

Captcha loading...