# During an auto-registration request an agent will log a warning messageif# the value returned by specified item is over limit of255characters. # This option is only used when HostMetadata is not defined. # # Mandatory: no # Default: # HostMetadataItem=### Option: RefreshActiveChecks # ...
default user to use for playbooks if user is not specified # (/usr/bin/ansible will use current user as default) #remote_user = root # logging is off by default unless this path is defined # if so defined, consider logrotate #log_path = /var/log/ansible.log # default module name ...
- name: Touch a file (creates if not present, updates modification time if present) win_file: path: C:\Temp\foo.conf state: touch - name: Remove a file, if present win_file: path: C:\Temp\foo.conf state: absent - name: Create directory structure win_file: path: C:\Temp\folder\...
vars: xuad: true tasks: - shell: sh /tmp/abcd.sh when: xuad tasks: - shell: sh /tmp/ when: not xuad 1. 2. 3. 4. 5. 6. 7. 8. 如果一个变量不存在,可以使用defined跳过执行此任务 tasks: - shell: sh /tmp/abcd.sh # 此任务不会执行 when: foo is defined - shell: sh /tmp...
('World',True)}}"-name:Example how to set default value if the variable is not definedansible.builtin.debug:msg:"Hello{{lookup('ansible.builtin.env','UNDEFINED_VARIABLE',default='World')}}"-name:Fail if the variable is not defined by setting default value to 'Undefined'ansible.builtin...
If set to `all', disables all excludes. If set to `main', disable excludes defined in [main] in yum.conf. If set to `repoid', disable excludes defined for given repo id. disable_gpg_check: # Whether to disable the GPG checking of signatures of packages being installed. Has an ...
{% if s.user is defined %}判断 是否有 s.user 这个变量 {%forsinservice%}{%ifs.user is defined%}user{{s.user}};{%else%}user root;{%endif%}worker_processes{{ansible_processor_vcpus*2}};pid/run/nginx.pid;server{listen{{s.port}}default_server;server_name{{s.name}}.{{s.domain}...
#cat apache.config.j2 NameVirtualHost *:80 {% for vhost in apache_vhost %} <VirtualHost *:80> ServerName {{ vhost.servername }} DocumentRoot {{ vhost.documentroot }} {% if vhost.serveradmin is defined %} ServerAdmin {{ vhost.serveradmin }} {% endif %} <Directory "{{ vhost.document...
If null, ansible will start with the same directory as the ansible script. Type: path Default: None Version Added: 2.8 Ini: Section: [persistent_connection] Key: ansible_connection_path Environment: Variable: ANSIBLE_CONNECTION_PATH Deprecated in: 2.22 Deprecated detail: This setting ...
#remote_port = 22 #module_lang = C # uncomment this to disable SSH key host checking host_key_checking = False # if so defined, consider logrotate log_path = /var/log/ansible.log # default module name for /usr/bin/ansible "/etc/ansible/ansible.cfg" 480L, 19547C written [root@...