![]() įrom here I am running tasks/upgrade_db. Then use the same variable to create a file on the target. Example 1 In this example, we will create a playbook like below where we use setfact for assigning value to a variable. ![]() Also as it is used in the msg tab, it will print the value of the output variable. rootapache:/var/www/html/ansible-docker-demo docker ps. I am using vars_prompt to ask for the data and add_host to build the inventory which works fine but in order to use the other data in future tasks I am using set_fact so essentially am duplicating code to accomplish my goals. We will create playbooks and run Ansible commands on the ansible-controller node and see the results on remote hosts. This will read the value of variable Output. This is where you will store YAML files with the steps needed to. I want to be able to prompt myself for a server and a few other details and then have my PB behave accordingly. ![]() I am writing a few tools to make some ad-hoc parts of my job easier and have made the playbooks to get everything done but I am doing something that feels "cludgy". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |