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
- Importing modules from parent folder
- How do I copy a file in Python?
- Extract a part of the filepath (a directory) in Python
- Python copy files to a new directory and rename if file name already exists
- Add multiple plugin directories
- Get a path to a different plugin
- Dash or underscore in theme folder name?
- Can I change get_template_directory_uri()?
- Group Posts by First Letter of Title
- Copy and delete a directory with WordPress functions
- Multisite installation combining subdomains and subdirectories
- Changing directory and/or URL structure
- WordPress in sub directory wp-admin problem
- Custom Post Type Archive in Sub Folder
- How long does it take for a new plugin to be approved?
- How to point my domain to a WordPress install in a sub-directory?
- Can I put my WordPress theme files in another folder?
- Permalinks not working on second wordpress installed in a subdirect
- How to Create Hierarchical Directory for Nation Wide Mental Health Services
- Why is there /index.php/ in all my links? How do I remove it?
- Change wp-content without changing the name of the folder
- How to copy one folder to another folder recursively
- Post Ancestor and Child Post in Custom Post Type
- How to restrict access to wp-content, wp-includes and all sub-folders
- Hosting plugin Google Code with auto update?
- Static files or dynamic WP pages for “static content”?
- Saving WordPress generated thumbnails in a subdirectory
- Where to save common libraries?
- Two identical wp-includes directories on server
- Menu Custom link – using relative link when WP is in a subdirectory
- Install theme on multiple domains
- Loading files for theme and child theme (Require)
- Checking for page templates in child theme
- Change the actual (or viewable) WordPress directory structure
- WordPress page templates in a directory
- Right permissions to WordPress directory
- wp theme.. Could not create directory
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- Access files at new location using old file paths
- Fixing custom 404 pages broken by WordPress in a subdirectory
- Installed theme uses get_template_directory, breaks WordPress on Windows
- How prevent someone from opening my theme directory
- uploading images to specified directories
- Mapping Subdomains in WordPress to give the appearance of a localised site, best approach?
- subdirectory install breaking existing links
- move_uploaded_file() not working on wordpress front end
- Is it possible to configure WordPress’s Core Files to accept duplicate Child Categories?
- subdirectory index.php is not working
- Auto-create a post with last 10 images in WordPress directory
- Accessing an image folder inside public web directory
- How to host unrelated pages on WordPress domain
- Is it possible to make *.js and folders visible in theme-editor
- Empty folder being created by WordPress, breaks site
- Multisite installation on an existing single installation
- why there is a large file named core in wpmu’s directory?
- Where is the right place to store custom images?
- Hiding Directory Path
- Should custom directories be created under the wp-content directory?
- Use of Folders within WordPress
- PHP in CSS file?
- google xml sitemap won’t work on directory install
- Wp-CLI not working with WordPress installed with composer
- Let users edit their role from the frontend
- WordPress File Structure
- Multisite for main in subdirectory, subdomain and subfolders (EN/ES)
- Infamous admin login redirect
- navigation doesn’t work in custom header.php
- Page not found when trying to link to files in child theme directory
- Moving from subdirectory and subdomain -> root
- Best way to transfer WordPress install to root of directory when I’m ready to launch?
- How to redirect template_directory to subdomain relativ url?
- WordPress Bedrock breaking plugin links
- How to Best Create Separate Subscribers and User Experience
- add menu page not showing Icon
- How to Install WP to Subdomain but Serve on Subdirectory?
- How can I upload and password protect Javadocs in WordPress?
- Install second wordpress in root subfolder, Error 404
- Show posts in a parent directory [duplicate]
- Need folder for CPT templates for eg: single-{post_type}.php
- Remove subdirectory from links
- Custom Gallery plugin uploading to different dir, and post to page
- Share a folder with files
- Creating a Treeview Listing of a Directory
- Installation directory for WordPress and child theme
- WordPress Multisite redirect loop
- How do I get WP site to show in both root and sub-directory
- Move WordPress with changed name ‘wp-content’
- WordPress Overrides folder permissions in Cpanel
- Index (Home) page not displayed when running wordpress in a subdirectory
- How do I block a subdirectory from WordPress theming?
- WP white screen of death after duping a site that works fine on same server
- Accidentally Changed WordPress Url
- Plugin SVN folder structure
- Multisite Sub-directories Installation
- How to set default Ansible username/password for SSH connection?
- Could moving my WordPress installation from /var/www/html/ to /var/www/ break the application?