You want the file module. To create a directory, you need to specify the option state=directory
:
- name: Creates directory file: path: /src/www state: directory
You can see other options at https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html
Related Posts:
- What is Android’s file system?
- What’s the best way to check if a file exists in C?
- FreeBSD: Directory called ^C (really!) – how to remove?
- ZFS vs XFS
- How do I copy a file in Python?
- How do I copy a file in Python?
- How to delete a file or folder in Python?
- How do I list all files of a directory?
- How can I safely create a nested directory in Python?
- Find the current directory and file’s directory [duplicate]
- What is the reason for the error message “System cannot find the path specified”?
- How do I list all files of a directory?
- How to find if directory exists in Python
- How do I find all files containing specific text on Linux?
- Importing modules from parent folder
- Importing modules from parent folder
- How can I safely create a nested directory in Python?
- How do I copy a file in Python?
- No space left on device
- PHP – Move a file into a different folder on the server
- How do I list all files of a directory?
- How to copy a file from one directory to another using PHP?
- How to change permissions for a folder and its subfolders/files in one step
- How to rename a directory/folder on GitHub website?
- Download a single folder or directory from a GitHub repo
- Creating a new directory in C
- How to change permissions for a folder and its subfolders/files in one step
- How can I get the source directory of a Bash script from within the script itself?
- What does it mean to mount a file system in linux?
- How to copy files?
- In a Git repository, how to properly rename a directory?
- Compare 2 directories in windows
- How can I add a blank directory to a Git repository?
- How can I get the list of files in a directory using C or C++?
- How can I get the list of files in a directory using C or C++?
- How to create a directory in Java?
- What is the current directory in a batch file?
- Count how many files in directory PHP
- How do I get the full path of the current file’s directory?
- Portable way to check if directory exists [Windows/Linux, C]
- Creating files and directories via Python
- How to change current working directory using a batch file
- If a folder does not exist, create it
- Extract a part of the filepath (a directory) in Python
- Can’t remove a directory in Unix
- Missing sudo password in Ansible
- How can I find script’s directory?
- Creating folders in C++
- Command prompt won’t change directory to another drive
- GIT_DISCOVERY_ACROSS_FILESYSTEM not set
- Python copy files to a new directory and rename if file name already exists
- Create a folder if it doesn’t already exist
- cd into directory without having permission
- What is the difference between \ and \\ in file path
- How can I rename a project folder from within Visual Studio?
- Recommendations for an address book/directory plugin WordPress?
- how to get wp-content folder in wordpress?
- Custom Post Type Templates from Plugin Folder?
- How to structure a plugin
- Add multiple plugin directories
- Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error
- How to get the path to the current theme?
- Moving a WP Multisite to a subdirectory
- get_template_directory() vs bloginfo( ‘template_directory’ ) vs TEMPLATEPATH
- Change upload directory for PDF files
- What’s the purpose of index.php in wp-content directory? [duplicate]
- Can wordpress theme folder name be changed freely and nothing technically happens
- Getting Images from theme’s directory in pages
- Get a path to a different plugin
- How to move page template files like page-{slug}.php to a sub-directory?
- Best Practice for Referencing the Plugin Directory
- How MUST the directory for a plugin be structured?
- Use a separate upload folder for custom post attachment upload
- Dash or underscore in theme folder name?
- Rename UPLOADS folder with custom WP_CONTENT_DIR
- What WP folder can I use to write files to?
- Categorising themes by folders in backend
- What is the best way to get directory path for wp-config.php?
- get_stylesheet_directory() returns wrong URI… localhost/using vhosts
- Move WordPress to subdirectory, keep ALL URLs
- Multisite in subfolder – How to make new sites to be in same level subfolders as the main site
- How do I serve static content on same domain as WordPress
- Could a large quantity of files in the uploads folder affect performance?
- Why should I use “Organize my uploads into month- and year-based folders” option? (Cons/Pros)
- Permissions to wp-content folder in Windows Server 2012
- File and directory permissions
- How to individually set WP_DEBUG on a sub-directory multisite?
- Benefits or Problems for using Sub-Directory vs Sub-Domain install of WP Network
- Non-WordPress page in subdirectory under WordPress page
- WP Page and Subdirectory with same name
- Multisite: differences between subdomain and subdirectory mode? Can it be switch after installation?
- Permalink Issues by Installing WordPress in Subdirectory / Subfolder
- Can I change get_template_directory_uri()?
- How do i structure my theme folder to avoid one huge list of files
- WordPress .htaccess subdirectory problem
- Namespacing WordPress project according to FIG standards
- Place static HTML files in path below WordPress page
- NGinx + WordPress Subdomain Multi with core in Subdirectory
- Site redirects to wrong url when saving settings
- How to get WordPress to save upload file beyond web root [closed]