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):
Part 2 (SSH Overview & Setup):
Part 3 (Setting up the Git Repository):
Part 4 (Running Commands):
Part 5 (Running Elevated Commands):
Part 6 (Writing our First Playbook):
Part 7 (The ‘when’ Conditional):
Part 8 (Improving your Playbook):
Part 9 (Targeting Specific Nodes):
Part 10 (Tags):
Part 11 (Managing Files):
Part 12 (Managing Services):
Part 13 (Adding Users): This video
Part 14 (Roles):
Part 15 (Host Variables):
Part 16 (Templates):

☁️ Get $100 in credit toward deploying your very own Linux servers on Linode!

🙌 Support me on Patreon and get early access to new content!

Wiki article for this video:

Getting Started with Ansible 13 – Managing Users

🛒 Affiliate store for Linux compatible hardware/accessories (commission earned):

💻 Check out the Tiny Pilot KVM for your Homelab (commission earned):

💻 Check out and spin up your very own Linux or Windows desktop in the cloud (commission earned):

🐦 Follow me on Twitter!

💬 Official Community:

📖 Check out jay’s latest book, Mastering Ubuntu Server 3rd Edition. Available now!

👨 More about me:

💽 How to create a bootable flash drive for installing Linux:

🐧 Which distro do I use?

🔐 How to better secure OpenSSH:

☁️ How to create a cloud Linux server with Linode:

#DevOps #Automation #Ansible


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


    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...