You are reading the article Learn How To Use Scripts In Indesign? updated in December 2023 on the website Kientrucdochoi.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 Learn How To Use Scripts In Indesign?
Introduction to InDesign ScriptsInDesign Scripts are code of computer language that helps us perform various tasks in just a few simple steps. We can perform simple and complex tasks with specific scripts, and we have a number of built-in scripts in InDesign under the Scripts panel. The coolest thing about the script of this software is that you can create your own scripts or run scripts created by other people for having a result of your desired task. Here in this article, I will tell you how you can use different scripts of script panel in this software and also tell you how you can install any script from external sources.
How to use Scripts in InDesign?To start using scripts in this software, you need not worry about it. It is very simple to work with it and use it to have our desired result. So let us start our discussion.
Start Your Free Design Course
3D animation, modelling, simulation, game development & others
I will start our discussion by taking a new document. I will choose this Letter size document from the New Document dialog box of this software.
Here at the right side of the user interface of this software, we have a panel section, and in this section, we can find the Script panel.
I will open the JavaScript folder, and you can see there is a number of the script in this list.
We use this script to align objects in a different manner, such as; you can see there are some options in the panel of AlignToPage script. But, again, I will go with default options this time; it will align our chosen object with the top left corner of the page.
So I will again open this align script panel and enable this ‘Consider Page Margin’ option.
Now let me tell you one of the scripts which we can use for text. When we paste text in the text frame of InDesign given by the client, we face many text formatting errors such as there may be an unnecessary gap, hyphens, tabs space, and so on. So with the next script, we can resolve it.
I have pasted this text in the text frame of this software, and you can see it seems this text is perfectly arranged.
Let me enable hidden characters, and we can enable it from the ‘Show Hidden Characters’ option of the scroll-down list of Type menu.
And you can see it resolve all formatting issue, and the text is perfectly arranged according to the type format.
What if you want to have your own script or want to use the downloaded script from an external source? You can also have this in the Scripts panel also, and it will come under the User folder of this Scripts panel, but if you haven’t any external script, then the User folder will be empty.
You can paste the script code of your desired script here in this folder. For example, I have downloaded a script from the internet and past it in the Scripts Panel folder. You can also paste your own written script code if you know about the Java language.
Now you can see there is our downloaded script in the User folder.
This script is for drawing waves for different data types if you create a design layout for any analysis. But, first, I will take the Frame tool from the tool panel to explain it.
And it will create a wave form like this.
Now I will make some changes in parameters like this.
And you can see according to parameters; it gives a different result.
You can change the colors of waves also.
ConclusionSo now you know how you can interact with the built-in script of InDesign and perform any task by using them. In addition, in this article, you learned how to insert your own or downloaded script in the Script panel of this software for using them in your design layout.
Recommended ArticlesThis is a guide to InDesign scripts. Here we discuss How to use Scripts in InDesign along with the step-by-step in detail. You may also have a look at the following articles to learn more –
You're reading Learn How To Use Scripts In Indesign?
How To Bold Text In Adobe Indesign (Quick Tips & Guide)
Many people start their InDesign journeys by expecting it to function like a word processing app. But InDesign’s focus on typography and design means that it works quite a bit differently, even when it comes to basic operations like making part of your text bold.
The process is still quite simple, but it’s worth taking a look at why InDesign is different.
Key Takeaways
Bold text in InDesign requires a bold typeface file.
Stroke outlines should not be used to create fake bold text.
Bold typefaces for use with InDesign are available from Adobe Fonts for free.
Creating Bold Text in InDesign
The quickest way to bold text in InDesign is to use the bold keyboard shortcut.
Select the text you want to bold using the Type tool, and then use the keyboard shortcut Command + Shift + B. If you have a bold version of the typeface available, your text will immediately display as bold.
You can also create bold text in InDesign by using the Character panel or the Control panel that runs across the top of the document window.
When you have a text frame object selected, the Control panel replicates all of the functionality of the Character panel, so it’s up to you which panel you want to use.
Wherever you choose to do it, this method gives you the ultimate level of control over your bold text, because many typefaces created for design professionals have multiple different bold types available.
For example, Garamond Premier Pro has four different bold versions, as well as four bold italic versions, not to mention the medium and semibold weights, which offer a huge degree of flexibility for typographic design.
If you want to remove bold, simply choose Regular or another version of the font.
When you want to make text thicker, select the text you want to adjust, and then select the bold typeface you want to use from the dropdown menu.
That’s all there is to it!
Adding Bold Fonts with Adobe Fonts
If you want to use a bold font but you don’t have the bold version of your typeface installed on your computer, you should check the Adobe Fonts website to see if you can install one.
Many of the typefaces on Adobe Fonts are available for free to anyone with an Adobe account, and there are over 20,000 fonts available if you have an active Creative Cloud subscription.
Not sure how to add new fonts? I have a tutorial on how to add fonts to InDesign that covers all the ins and outs of the process.
Making Bold Text in InDesign the Hideous Way
I need to say right at the start that I do not recommend that you ever do this. I wouldn’t even mention it in this article at all, except that so many other tutorials pretend that it is an acceptable way to change font weight in InDesign – and it is definitely not a good idea, as you’ll see.
InDesign can add an outline (known as a stroke) around any object, including text characters. Adding a line around your text definitely makes it look thicker, but it will also completely ruin the shapes of the letters and may even cause them to overlap each other, turning each word into an unreadable mess, as you can see below.
So many tutorials recommend this, but it’s absolutely hideous
Proper bold typefaces are designed to be bold from the very beginning, so the letterforms do not get distorted or cause any display issues when used.
InDesign is a favorite tool of typographers, and no typographer worth the title would ever use the stroke method to make bold text in InDesign because it completely destroys the style of the typeface.
No matter what your skill level is, you probably shouldn’t use it either!
A Final Word
That’s everything there is to know about how to bold text in InDesign, as well as a cautionary tale about why you shouldn’t use strokes to bold text in InDesign.
As you get more familiar with typography and typeface design through your InDesign work, you’ll understand why it’s important to work with well-designed typefaces that offer proper bold versions.
Happy typesetting!
How To Run Python Scripts: Step By Step Guide
What is the Script in Python?
A script in Python can be defined as a file that consists of Python code or a program. It ends with an extension as .py
An interpreter can execute a script in two distinct ways, as listed below: –
A script can be executed as a module or as a script itself.
A code that is written in an interactive Python command prompt session manner.
How to run Python code and scripts interactively?Here are steps to do this:
Step 1) The programmer must open the command line in the interactive mode.
Step 2) In the next step, invoke the python interpreter in the command line by typing the following command: –
Command:
pythonStep 3) The programmer can sequentially write Python code and execute them in the same order.
The following program can be typed in the command line as shown below:
Example: –
Python Code:
python print ('hello world Guru99')Output:
hello world Guru99Let us take another Python code that could be written in the command line interactively.
Example:
Python Code:
Python a=25 b=50 ... print ("a is more than b") ... else: ... print ("b is more than a") ... b is more than a >>>Output:
b is more than aFollowing is the screenshot: –
Explanation:
The above code compares two arguments and finds which argument is greater. Ensure the statements are properly indented to avoid indentation errors. To exit the windows commanded line, press Ctrl+Z and follow with an Enter.
How to run Python script files interactively from Windows GUI?Here are steps to do this:
Step 1) Open the command line and type the Python command followed by the script file name.
Step 2) Ensure that the script file is already created.
Step 3) The script file should end with either .py or. pyw. As a next step, open the Windows command prompt.
Following would be the code to be written in the command line to invoke a Python script:
Python Command line Code:
Python example.pyOutput:
Hello, world! How to run Python scripts from an IDEAn integrated development environment is also referred to as IDE in short form. It offers a virtual setup of file and folder hierarchy. It allows the programmer to build Python projects quickly. IDE provides the organization of files into different folders.
These different folders belong to one common directory.
Spyder and PyCharm are two Python IDEs that enable the programmer to run Python programs.
Let us take an example of executing a Python script in PyCharm IDE:
Step 1) As the first step, create a new project in PyCharm.
Step 4) Go to the new option and create a new Python file.
Step 5) Give the name of the Python file
Here we have given Guru99Example.
Step 6) In the blank Python file created in PyCharm IDE, write the following piece of code as shown below: –
Python Code:
print ('hello world Guru99')This code will open the console window within IDE, and the following would be the output:
Output:
PyDev console: starting. Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2023, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32 >>> runfile('C:/Users/OS Name/PycharmProjects/Guru99Example/Guru99Example.py', wdir='C:/Users/OS Name/PycharmProjects/Guru99Example') hello world Guru99Following is the Screenshot:
Explanation:
The above code is a simple example of how to print hello world in the PyCharm IDE.
How to run Python scripts using a file manager?Here are the steps to run the Python script using file manager:
Step 1) Open Notepad and add some Python code.
Step 2) Type print (‘Hello World Guru99’)
Step 3) Save the script file with extension as either .py or. pyw.
Step 4) .py extension file is used for programs that have Python.exe.
When executed, it opens a command line screen for a moment. Refer to the below screenshot: –
To ensure the screen remains for a while, add the following statement in the Python script file as shown below: –
Python Code:
input ('Press provide enter to exit...')Until and unless there is no input from the user, the screen continues to run and display Python output.
However, if the Python script has some error, the execution of the input command is interrupted or aborted. Due to this, the user may not be able to see Python script execution using file manager.
How to run Python scripts using script file name and command line?
Here are the steps to run the Python script using script file name and command line:
Step 1) Open Notepad and add some Python code.
Step 2) Type print (‘Hello World Guru99’)
Step 3) Save the script file with extension as either .py or. pyw.
Step 4) .py extension file is used for programs that have Python.exe.
It helps to validate the path of the script file with the command line path. Open a command line and type the script file name as created above with the name followed by the extension .py. Refer to the below screenshot: –
Alternatively, the script file created above can be run as a python module. Type the following command as shown below: –
Code:
python -m exampleOutput:
hello world Press provides enter to exit...Refer to the following screenshot:
Explanation:
The above code follows the following syntax:
Syntax:
Python -mThe above -m parameter searches for the sys. Path for the module referred to and executed the code as part of the _main_.
How to run Python Scripts on LinuxHere are steps to do this:
Step 1) The programmer must open the Linux terminal in the interactive mode.
Step 2) In the next step, invoke the Python interpreter in the Linux terminal by typing the following command: –
Command:
python3Step 3) The programmer can sequentially write Python code and execute them in the same order.
The following program can be typed in the command line as shown below:
Example: –
Python Code:
python3 a=25 b=50 ... print ("a is more than b") ... else: ... print ("b is more than a") ... b is more than a >>>Output:
b is more than aFollowing is the screenshot: –
Alternatively, Here are the steps to run the Python script file using a Linux terminal:
Step 1) Open the text editor and add some Python code.
Step 2) Type print (‘Hello World’)
Step 3) Save the script file with extension as.py.
Step 4) .py extension file is used for programs that have Python.exe.
Step 5) In the next step, invoke the Python interpreter in the Linux terminal by typing the following command: –
Command:
python3 chúng tôiOutput:
hello worldRefer to the following screenshot: –
Explanation:
The python interpreter in the Linux terminal runs the script file that is saved at the desktop location.
Comparison of code, module, and script in PythonIn the world of computing, the following is the comparison between module, code, and script:
Parameters Code Module Script
Definition A code is defined as a series of instructions. A module is defined as a series of codes arranged sequentially. A script can be defined as a file that comprises logical orders or a batch of organized codes.
Executability They are run through the Python interpreter They are imported first in a script or a piece of code and then executed using the Python interpreter The scripts are generally run through a Python interpreter.
FAQA Python interpreter can be considered an interface or a bridge that helps execute code or a script. It runs the code in two manners:
It invokes a script or a module.
It invokes a code written in an active session.
Python interpreter works in the following manner: –
Post evaluation, it prints the results of the command.
It loops backward and performs the repetition of the process.
A Python interpreter is available in several forms, as listed below:
Interpreter Description
Jython Using Java programming language, Python programs can be run on java-based platforms.
PyPy Interpreter designed in a Python programming language.
CPython Interpreter designed using C language to run and execute Python programs in C-based platforms
IronPython It is an open-source project which used as an interpreter for .Net platforms.
The Python script is run under the multi-step process defined as Python Execution Model. Under this model, the statements defined in the script are processed and executed step-by-step.
Following are the basic requirements needed to execute a Python Script:
Make the Python script executable and install the interpreter beforehand on the computer.
You should have a code editor or an integrated development environment pre-installed in the computer’s operating system.
Add Python beforehand to execute code through the command line to the operating system environment variable.
Conclusion
A Python script can be executed using several methods.
You can execute using the command line or using IDE.
The programmer can use PyCharm and Spyder IDE to develop sophisticated Python scripts.
Ensure that the code adheres to indentation when using the if and else statements in the command line.
Learn How Does Either Works In Haskell?
Introduction to Haskell either
In Haskell either is used to represent the possibility of two values. Either is used to represent two values that can be correct or error. It has two constructors also which are named Left and Right. These constructors also represent and show some purpose either in Haskell. Here Left constructor will show the error value, while on the other hand Right constructor will show the correct value. In the coming section of the tutorial, we will see how this function works in Haskell in more detail, and also we will see its implementation and usage while doing programming in Haskell.
Start Your Free Software Development Course
Web development, programming languages, Software testing & others
In this section we will see the syntax for either in Haskell, which is given by their official documentation, let’s have a closer look at the syntax of it for better understanding see below;
data Either a bAs you can see in the above line of syntax we have its basic definition with us. Here we are using either keyword followed by two values ‘a’ and ‘b’. Let’s have a look at the practice syntax for either, which will be more helpful to get a better idea for either in Haskell for beginners to see below;
Example:
let variable_name = Your_constructor "value if any" :: Either a basic How does either work in Haskell?As we already know that either is used to represent two values which can be either correct or error. It also contains two constructors which further used to represent these values in Haskell either. So by the use of either, we can represent our value which is either correct or error. In this section we will first see its definition by the Haskell documentation to get a better idea, let’s get started to see below;
Method signature:
As you can see in the above line of definition for either in Haskell, is given by the Haskell official documentation. This is available inside the Data library, so we can use it as Data.eithe in Haskell. Also if we can see this closely we have two values here ‘a’ and ‘b’. These values are represented by the Left and Right constructor which will turn represent the value as correct and error. After the ‘=’ operator in the above definition, we are trying to represent the ‘a’ value by the Left constructor, and ‘b’ values is represented by the Right constructor. Below we will see the detailed description of both these constructors for better understanding see below;
Available Constructor:
1. Left: As per the official documentation of the Haskell, and as per the convention Left constructor in either is used to represent the error value. Below see the syntax to use it for better understanding see below;
Example:
Left a1. Right: As per the official documentation of Haskell, and as per the convention Right constructor in either is used to represent the correct value. Below see the syntax to use it for better understanding see below;
Example:
Right a1. isRight: This method is used to check whether we have passed the right value or not. It will return us the Boolean true or false. If the value if Right value then it will return true else it will return false. Below see the definition of the method as per the Haskell documentation for better understanding see below;
Example:
Now we will see one practice syntax how we can use this while programming in Haskell;
Example:
isRight (Right "your value ")As you can see in the above line of code we are using the isRight method followed by the Right value passed inside the bracket. In this way, you can use it to evaluate the result of the passed value.
2. isLeft: This method is used to check whether we have passed the left value or not. It will return us the Boolean true or false. If the value is Left value then it will return true else it will return false. Below see the definition of the method as per the Haskell documentation for better understanding see below;
Example:
Example:
isLeft (Left "your value ")As you can see in the above line of code we are using the isLeft method followed by the Left value passed inside the bracket. In this way, you can use it to evaluate the result of the passed value.
Examples1. In this example we are trying to identify the value as string or int by using the either Left and Right constructor available. Remember if you want to use either while programming does not forget to import this in your program otherwise it will not work.
Example:
import Data.Either main = do print("Demo to show wokring of either in Haskell !!") print("Using either to evaluate the value either instance of string or inte using either in Haskell !!") let val1 = Left "Hello" :: Either String Int let val2 = Right 100 :: Either String Int let val3 = Left "Hellow world" :: Either String Int let val4 = Left "I m string !!" :: Either String Int let val5 = Right 900 :: Either String Int let val6 = Left "I am another string" :: Either String Int let val7 = Right 500 :: Either String Int print("Printing the result after either evalution !!") print("result one is :: ", val1) print("result two is :: ", val2) print("result three is :: ", val3) print("result four is :: ", val4) print("result five is :: ", val5) print("result six is :: ", val6) print("result seven is :: ", val7)Output:
ConclusionBy the use of either in Haskell we can easily identify the passing value is correct or error. We also have so many methods available which can be used either to get the result fast for passing Right and Left value in Haskell. Mainly it is used to show the possibility between the two values either a or b.
Recommended ArticlesWe hope that this EDUCBA information on “Haskell either” was beneficial to you. You can view EDUCBA’s recommended articles for more information.
How To Use Vlookup In Excel
The VLOOKUP function in Excel scares a lot of people because it has a lot of parameters and there are multiple ways to use it. In this article you’ll learn all of the ways you can use VLOOKUP in Excel and why the function is so powerful.
Table of Contents
VLOOKUP Parameters In ExcelWhen you start typing =VLOOKUP( into any cell in Excel, you’ll see a pop-up showing all of the available function parameters.
Let’s examine each of these parameters and what they mean.
These four parameters let you do a lot of different, useful searches for data inside of very large datasets.
A Simple VLOOKUP Excel ExampleVLOOKUP isn’t one of the basic Excel functions you might have learned, so let’s look at a simple example to get started.
It would be very time consuming to search through such a large dataset to find the school that you’re interested in.
Instead, you can create a simple form in the blank cells on the side of the table. To conduct this search, just make one field for School, and three additional fields for reading, math, and writing scores.
Next, you’ll need to use the VLOOKUP function in Excel to make these three fields work. In the Reading field, create the VLOOKUP function as follows:
Type =VLOOKUP(
Select the School field, which in this example is I2. Type a comma.
Select the entire range of cells that contain the data you want to look up. Type a comma.
When you select the range, you can start from the column you’re using to look up (in this case the school name column), and then select all of the other columns and rows that contain the data.
Note: The VLOOKUP function in Excel can only search through cells to the right of the search column. In this example, the school name column needs to be to the left of the data you’re looking up.
Next, to retrieve the Reading score, you’ll need to select the 3rd column from the leftmost selected column. So, type a 3 and then type another comma.
Finally, type FALSE for an exact match, and close the function with a ).
Your final VLOOKUP function should look something like this:
=VLOOKUP(I2,B2:G461,3,FALSE)When you first press Enter and finish the function, you’ll notice the Reading field will contain an #N/A.
This is because the School field is blank and there is nothing for the VLOOKUP function to find. However, if you enter the name of any high school you want to look up, you’ll see the correct results from that row for the Reading score.
How To Deal With VLOOKUP Being Case- SensitiveYou may notice that if you don’t type the name of the school in the same case as how it’s listed in the dataset, you will not see any results.
This is because the VLOOKUP function is case sensitive. This can be annoying, especially for a very large dataset where the column you’re searching through is inconsistent with how things are capitalized.
To get around this, you can force what you’re searching for to switch to lowercase before looking up the results. To do this, create a new column next to the column you’re searching. Type the function:
=TRIM(LOWER(B2))This will lowercase the school name and remove any extraneous characters (spaces) that might be on the left or right side of the name.
Now that all of your data is cleaned up in this new column, slightly modify your VLOOKUP function in Excel to use this new column instead of the previous one by starting the lookup range at C2 instead of B2.
=VLOOKUP(I2,C2:G461,3,FALSE)Now you’ll notice that if you always type your search in lower case, you’ll always get a good search result.
This is a handy Excel tip to overcome the fact that VLOOKUP is case sensitive.
VLOOKUP Approximate MatchWhile the exact match LOOKUP example described in the first section of this article is pretty straightforward, the approximate match is a little more complex.
The approximate match is best used to search through number ranges. To do this correctly the search range needs to be properly sorted. The best example of this is a VLOOKUP function to search for a letter grade that corresponds to a number grade.
If a teacher has a long list of student homework grades from throughout the year with a final averaged column, it would be nice to have the letter grade corresponding to that final grade come up automatically.
This is possible with the VLOOKUP function. All that’s required is a lookup table off to the right that contains the appropriate letter grade for each numerical score range.
Now, using the VLOOKUP function and an approximate match, you can find the proper letter grade corresponding to the correct numeric range.
In this VLOOKUP function:
lookup_value: F2, the final averaged grade
table_array: I2:J8, The letter grade lookup range
index_column: 2, the second column in the lookup table
[range_lookup]: TRUE, approximate match
Once you finish the VLOOKUP function in G2 and press Enter, you can fill in the rest of the cells using the same approach described in the last section. You’ll see all of the letter grades properly filled in.
Note that the VLOOKUP function in Excel searches from the bottom end of the grade range with the assigned letter score to the top of the range of the next letter score.
So, “C” needs to be the letter assigned to the lower range (75), and B is assigned to the bottom (minimum) of its own letter range. VLOOKUP will “find” the result for 60 (D) as the closest approximate value for anything between 60 to 75.
VLOOKUP in Excel is a very powerful function that has been available for a long time. It is also useful for finding matching values anywhere in an Excel workbook.
Keep in mind, however, that Microsoft users who have a monthly Office 365 subscription now have access to a newer XLOOKUP function. This function has more parameters and additional flexibility. Users with a semi-annual subscription will need to wait for the update to roll out in July 2023.
Learn How Untar Works In Ansible With Examples
Introduction to Ansible untar
Ansible untar module also known as unarchive for Unix OS or win_zip for the windows operating system is used to extract or unpack the archive files or folders on the remote destination by copying the archive file first by default on the remote server and also supports many parameters to deal with the unarchive or win_zip functionality like the owner, dest, exclude and more.
Start Your Free Software Development Course
Web development, programming languages, Software testing & others
SyntaxFor the non-windows target unarchive or ansible.builtin.unarchive command uses the below syntax. We have shown the basics parameters
Parameters:
copy: No / Yes (Default)
The default Option is Yes and it copies the files from the local controller to the remote host if specified yes or nothing specified. For working with the remote source need to specify the remote_src and this copy parameter is not helpful there.
src (required):
Source path of the file. If remote_src is ‘yes’ then the source path would be on the remote location otherwise the source path is on the local controller node.
dest (required):
Remote server absolute path where the archive is going to extract.
remote_src: no (Default) / yes
If set ‘yes’ specifies that the source archive path is on the remote computer. For the ‘no’ value the path is on the local controller node.
owner:
name of the user that should own the files/directory after unpack and same replicates (added) to the chown.
group:
Name of the group that should own the files/directory and same replicates (added) to the chown.
exclude:
List of files or directories that need to be excluded from the unpacking.
include:
List of files or directories that need to be included in the unpacking process.
keep_newer: no (default) / yes
If set yes, it replaces the existing files that are newer than the files inside the archive.
mode:
Permissions that the files or directories should have after unpacked (like 644, 777, etc).
For the windows target src, dest, creates parameters remain the same as unarchive module and the additional parameters are as below.
Parameters:
delete_archive: no (default) / yes
Removes the zip file after unzipping.
password
If the Zip file is password encrypted then this parameter is useful and it requires the PSCX module to be installed.
recurse: no (default) / yes
recursively expands the zip file within the src directory.
Setting value ‘yes’ requires the PSCX module to be installed.
Please note: the win_unzip module doesn’t use the remote_src parameter.
How untar works in Ansible?Ansible unarchive module for non-windows target comes with the ansible-base and so it is included in the Ansible installations. For the windows target, we need to use the win_unzip module. If the module is not available then you can download it from the galaxy.
ansible-galaxy collection install community.windows
Below is the simple playbook for windows untar (unzip).
dest: c:temp7zipInstaller
Output:
The above playbook will unzip the file from the source location to the destination remote servers. If the destination path doesn’t exist it creates the destination path.
You must have noticed here, although the source path is remote, we don’t need to use remote_src because the win_unzip module doesn’t support it and when we use the remote source path for the non-target windows server we must specify the remote_src. For example,
remote_src: yes
ExamplesHere are the following examples mention below
Example #1 – unarchive module task for UNIX os.dest: /tmp/phyes
In this playbook, it will retrieve the chúng tôi file to the destination remote host /tmp/phyes. Before running this task unlike the win_unzip module, you need to make sure that the destination path exists otherwise it will throw an error.
Output:
Example #2 – Exclude files from the archive.To exclude the certain file from the unpacking we can use h
Code:
exclude: ’Test1 document.txt’
If there are multiple files to exclude then you can provide the list as below.
- ’sourcefile.py’
Example #3 – Include files from the archiveCode:
include: ’Test1 document.txt’
The above playbook will include only the test1 text file and to include the multiple documents, use the below command.
- ’sourcefile.py’
Example #4 – using multiple parameters together.Code:
owner: ansibleadmin
In the above playbook, it will include only 2 files, keep_newer parameter will not replace the existing files that are newer than files from the archive, remote_src indicates the remote source and it will set the owner permission on the files and it will keep the file permission 0644.
ConclusionUntar or unarchive or unzip modules are very useful when we write the playbook. It makes it easier to extract the files or folders on the destination server without using any third-party software and in addition, it uses various parameters like we don’t need to copy the file before extracting, adding permissions after extract, etc.
Recommended ArticlesThis is a guide to Ansible untar. Here we discuss How untar works in Ansible and Examples along with the codes and outputs. You may also look at the following articles to learn more –
Update the detailed information about Learn How To Use Scripts In Indesign? on the Kientrucdochoi.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!