ansible create folder
- name: Create a directory if it does not exist
ansible.builtin.file:
path: /etc/some_directory
state: directory
mode: '0755'
ansible create folder
- name: Create a directory if it does not exist
ansible.builtin.file:
path: /etc/some_directory
state: directory
mode: '0755'
copy folder ubuntu
$ cp -r /source_directory /destination_directory
ansible copy
- name: Copy in config file for RHEL
copy:
src: './files/rhel/syslog'
dest: '/etc/logrotate.d/'
owner: root
group: root
mode: '0600'
when:
- ansible_facts['distribution'] == 'RedHat'
become: yes
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us