I use Ubuntu 18.04 with Ansible installed this way:
apt-get update -y install software-properties-common apt-add-repository ppa:ansible/ansible apt install ansible
I also have a small Bash script I store in GitHub that I sometimes copy-paste into the terminal of remote machines I hire to store my own websites on (as for now I plan to have only one such remote machine, not tens/hundreds or thousands as common for most Ansible users).
#!/bin/bash apt-get update -y apt-get install lamp-server^ apt-get install php-mbstring php-mcrypt php-curl php-cli php-gd curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer
One could say "well, if it's just one machine don't use Ansible at all, it would be an overkill" but I still feel the need to automate this as it is a very "messy" installation command set that might change "tomorrow".
I don't find literature to explain how I could do the same installations, inside the Bash terminal (say from copy-pasting the command set) but with Ansible. I also bought a printed version of Jeff Geerling's book "Ansible for Devops" but none of the basic chapters covers my particular need.
All I find is how to deploy a playbook file to a list of IPs but I don't want to use this "traditional" way for Ansible. I just want to copy a Ansible YAML command set from GitHub to my terminal.
Do you know how I could do that?