Answers for "ansible copy directory"

2

ansible create folder

- name: Create a directory if it does not exist
  ansible.builtin.file:
    path: /etc/some_directory
    state: directory
    mode: '0755'
Posted by: Guest on January-12-2021
7

copy folder ubuntu

$ cp -r /source_directory /destination_directory
Posted by: Guest on November-12-2020
0

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
Posted by: Guest on May-26-2020

Browse Popular Code Answers by Language