当前位置: 首页 > wzjs >正文

做网站美工需要会什么软件制作简单的网页代码

做网站美工需要会什么软件,制作简单的网页代码,深圳 网站定制,牛推网络ansible.builtin.stat 可以查看文件信息。 选项 类型 默认值 描述 pathstrnull 要检查的文件或目录的完整路径(必需)。 followboolfalse 如果是符号链接,是否跟随到目标路径上获取其状态。 get_attributesbooltrue 是否返回扩展属性&#…

ansible.builtin.stat 可以查看文件信息。

选项

类型

默认值

描述

pathstrnull

要检查的文件或目录的完整路径(必需)。

followboolfalse

如果是符号链接,是否跟随到目标路径上获取其状态。

get_attributesbooltrue

是否返回扩展属性(如 SELinux 上的安全上下文、ACL 等),仅在底层文件系统支持时生效。

get_checksumbooltrue

是否计算并返回文件的校验和。

checksum_algorithmstrsha1

指定用于计算校验和的算法,如 md5sha1sha224sha256sha384 和 sha512。仅在 get_checksum: true 时生效。

get_mimebooltrue

是否检测并返回文件的 MIME 类型

- name: Get stats of a fileansible.builtin.stat:path: /etc/foo.confregister: st
- name: Fail if the file does not belong to 'root'ansible.builtin.fail:msg: "Whoops! file ownership has changed"when: st.stat.pw_name != 'root'- name: Get stats of the FS objectansible.builtin.stat:path: /path/to/somethingregister: sym- name: Print a debug messageansible.builtin.debug:msg: "islnk isn't defined (path doesn't exist)"when: sym.stat.islnk is not defined- name: Print a debug messageansible.builtin.debug:msg: "islnk is defined (path must exist)"when: sym.stat.islnk is defined- name: Print a debug messageansible.builtin.debug:msg: "Path exists and is a symlink"when: sym.stat.islnk is defined and sym.stat.islnk- name: Print a debug messageansible.builtin.debug:msg: "Path exists and isn't a symlink"when: sym.stat.islnk is defined and sym.stat.islnk == False- name: Get stats of the FS objectansible.builtin.stat:path: /path/to/somethingregister: p
- name: Print a debug messageansible.builtin.debug:msg: "Path exists and is a directory"when: p.stat.isdir is defined and p.stat.isdir- name: Do not calculate the checksumansible.builtin.stat:path: /path/to/myhugefileget_checksum: no- name: Use sha256 to calculate the checksumansible.builtin.stat:path: /path/to/somethingchecksum_algorithm: sha256

修改文件或目录属性(或创建文件\软链接)

ansible.builtin.file:设置文件、目录或符号链接及其目标的属性。或者,删除文件、符号链接或目录。

有些功能其他模块也能实现。

选项

类型

默认值

描述

access_timestrnull

要设置的访问时间(atime),格式由 access_time_format 指定。

access_time_formatstr%Y%m%d%H%M.%Saccess_time

 的时间格式,基于默认的 Python 格式(详见 time.strftime 文档)。

attributesstrnull

设置文件扩展属性(如 +i 只读、+a append-only)。

followbooltrue

如果 path 是符号链接,是否跟随到目标文件。

forceboolfalse

在两种情况下强制创建符号链接:源文件不存在(但稍后会出现);目标文件存在且为文件(因此,我们需要取消链接 path 文件并创建指向 src 文件的符号链接来代替它)。

groupstrnull

要设置的文件组。

modestrnull

要设置的权限模式,格式如 0644 或 u=rw,g=r,o=r

modification_timestrnull

文件的修改时间。可设为 preserve(保留原时间)、now(当前时间)或 YYYYMMDDHHMM.SS 格式。默认随 state 推断:touch 为 now,其他为 preserve

modification_time_formatstr%Y%m%d%H%M.%Smodification_time

 的时间格式,基于默认 Python 格式(参见 time.strftime 文档)。

ownerstrnull

要设置的文件所有者。

pathstrnull

要操作的文件或目录路径,别名 destname(必填)。

recurseboolfalse

是否递归设置目录及其子文件的权限、所有者等,仅用于目录。

selevelstrnull

SELinux 等级,通常用于细粒度 SELinux 策略控制。

serolestrnull

SELinux 角色。

setypestrnull

SELinux 类型。

seuserstrnull

SELinux 用户。

srcstrnull

当 state=link 或 state=hard 时,指定链接到的文件的路径。

statestrnull

目标状态,如 filedirectorylinkabsenttouchhard

unsafe_writesboolfalse

避免创建临时文件后再移动,直接修改原文件。用于某些特殊场景,可能会影响原子性。

针对 state 补充一下:

  • 如果设置为 absent,将递归删除目录,或取消链接文件和符号链接。对于目录,若启用了 diff,在结果中会显示被删除的文件和子目录,列于 path_contents 字段中。需要注意的是:如果指定的 path 不存在,此状态不会导致 ansible.builtin.file 任务失败,因为状态本身未发生变化。

  • 如果设置为 directory,则会创建指定目录及其所有不存在的中间父目录。从 Ansible 1.7 起,这些目录将使用指定的权限(如 mode)创建。

  • 如果设置为 file 且未指定其他参数,则该任务会返回 path 的当前状态而不会进行更改。如果指定了权限等参数(如 mode),且文件存在,则会修改该文件。但如果文件不存在,则不会自动创建文件。若希望在文件不存在时创建,可使用 touch 状态,或改用 ansible.builtin.copy 或 ansible.builtin.template 模块。

  • 如果设置为 hard,将创建或更新一个硬链接,指向由 src 指定的路径。

  • 如果设置为 link,将创建或更新一个符号链接(软链接),目标路径由 src 指定。

  • 如果设置为 touch(Ansible 1.4 引入),将模拟命令行中的 touch 行为:若文件不存在,则创建一个空文件;若文件或目录已存在,则更新其访问时间和修改时间。

  • 默认行为:如果文件已存在,默认使用该文件的当前类型。如果设置了 recurse: yes,默认状态为 directory;否则为 file

- name: Change file ownership, group and permissionsansible.builtin.file:path: /etc/foo.confowner: foogroup: foomode: '0644'- name: Give insecure permissions to an existing fileansible.builtin.file:path: /workowner: rootgroup: rootmode: '1777'- name: Create a symbolic linkansible.builtin.file:src: /file/to/link/todest: /path/to/symlinkowner: foogroup: foostate: link- name: Create two hard linksansible.builtin.file:src: '/tmp/{{ item.src }}'dest: '{{ item.dest }}'state: hardloop:- { src: x, dest: y }- { src: z, dest: k }- name: Touch a file, using symbolic modes to set the permissions (equivalent to 0644)ansible.builtin.file:path: /etc/foo.confstate: touchmode: u=rw,g=r,o=r- name: Touch the same file, but add/remove some permissionsansible.builtin.file:path: /etc/foo.confstate: touchmode: u+rw,g-wx,o-rwx- name: Touch again the same file, but do not change times this makes the task idempotentansible.builtin.file:path: /etc/foo.confstate: touchmode: u+rw,g-wx,o-rwxmodification_time: preserveaccess_time: preserve- name: Create a directory if it does not existansible.builtin.file:path: /etc/some_directorystate: directorymode: '0755'- name: Update modification and access time of given fileansible.builtin.file:path: /etc/some_filestate: filemodification_time: nowaccess_time: now- name: Set access time based on seconds from epoch valueansible.builtin.file:path: /etc/another_filestate: fileaccess_time: '{{ "%Y%m%d%H%M.%S" | strftime(stat_var.stat.atime) }}'- name: Recursively change ownership of a directoryansible.builtin.file:path: /etc/foostate: directoryrecurse: yesowner: foogroup: foo- name: Remove file (delete file)ansible.builtin.file:path: /etc/foo.txtstate: absent- name: Recursively remove directoryansible.builtin.file:path: /etc/foostate: absent

文章转载自:

http://4PoW8gLm.ddqdL.cn
http://YjhFXEDx.ddqdL.cn
http://kGjzZpEx.ddqdL.cn
http://8e91MSZz.ddqdL.cn
http://smldAYgs.ddqdL.cn
http://IZ61gvrR.ddqdL.cn
http://Zm5IlCOk.ddqdL.cn
http://xpLdUZZ7.ddqdL.cn
http://zJR1e4mG.ddqdL.cn
http://Y0vFjbAA.ddqdL.cn
http://TmnpaeS2.ddqdL.cn
http://0y25L1KY.ddqdL.cn
http://g36vlxh3.ddqdL.cn
http://YfbaF4yb.ddqdL.cn
http://MFcmNyFC.ddqdL.cn
http://xlHN2bHm.ddqdL.cn
http://sUSDj2zk.ddqdL.cn
http://9ZVOo7zv.ddqdL.cn
http://4lleVMi4.ddqdL.cn
http://2eW2CzHu.ddqdL.cn
http://oRM44Ibx.ddqdL.cn
http://u8zAX2zF.ddqdL.cn
http://cGzAyKou.ddqdL.cn
http://EJ9WSESv.ddqdL.cn
http://00oDgcIj.ddqdL.cn
http://Pzt60OVY.ddqdL.cn
http://0AveVhmm.ddqdL.cn
http://X6yU4uLm.ddqdL.cn
http://ej81bPIs.ddqdL.cn
http://JUTxwQeF.ddqdL.cn
http://www.dtcms.com/wzjs/777378.html

相关文章:

  • 问卷星网站开发市场调查问卷微信小程序商城源码
  • 新类型 网站广西哪里有网站建设
  • 手机购物网站 建站民众镇做网站公司
  • 门户网站开发价格wordpress新闻模板下载
  • 深圳宝安网站建设公司可免费注册的网站
  • 收录网站工具名者观看网站
  • 展示型企业网站建设wordpress添加全屏广告
  • 做公益网站有什么要求市场营销策划属于什么行业
  • 石家庄建站源码网站开发尾款如何做账
  • 网站定制分享商城类网站模板
  • 廊坊网站建设-纵横网络 网站正规的网站制作哪个好
  • 上海金桥建设监理有限公司网站网站开发 太原
  • 宁波网站推广排名淘宝如何刷关键词增加权重
  • 天津大型网站建设报价公司页面seo优化
  • 个人网站 cmswordpress数据备份还原
  • 网站制作的地方网站推广 软件
  • 苏州市建设局老网站企业网站打不开了
  • 网站模版 免费下载wordpress 有道云笔记
  • 为什么网站打开老是提示建设中wordpress 主题 相册
  • dede视频网站模板石家庄369招聘信息网
  • 网站页面如何设计接网站 建设
  • 网站建设方案打包网站建设培训班学费
  • 平度网站建设html5网站的优点
  • 网站建设项目招标书平面设计的网站
  • 奥派电子商务网站建设论文私有云可以做网站
  • ui是什么设计优化方案答案
  • 网站建设怎样找客户巴顿品牌设计
  • 创业谷网站建设方案公司建设网站流程
  • 做网站的外包能学到什么做淘宝客需要建网站吗
  • 德国设计网站大全网站建网站建设企业电话