--- # tasks file for ansible-perforce_sdp_install # Run on ALL Hosts based on var - name: "Run clean commands" shell: "{{ item }}" ignore_errors: yes with_items: - "{{ perforce_clean_commands }}" when: perforce_clean - name: "Run data volume clean" shell: "rm -rf /{{ perforce_data_volume }}/p4" when: (perforce_clean) and (not perforce_depots_use_nfs) # Run on ALL Hosts based on var - name: "Run network_clean_redhat commands" shell: "{{ item }}" ignore_errors: yes with_items: - "{{ network_clean_redhat }}" when: perforce_clean and ansible_facts["os_family"]=="RedHat" and dummy_interface # Run on ALL Hosts based on var - name: "Run network_clean_debian commands" shell: "{{ item }}" ignore_errors: yes with_items: - "{{ network_clean_debian }}" when: perforce_clean and ansible_facts["os_family"]=="Debian" and dummy_interface # Run on ALL hosts based on var - name: "Include dependencies" include_tasks: "dependencies.yml" when: update_dependencies # Run on ALL hosts - name: "Include installation" include_tasks: "install.yml" when: new_sdp # Run on ALL hosts - name: "Include cron" include_tasks: "cron.yml" - name: "Copy id_rsa" copy: src: "./id_rsa" dest: "/p4/.ssh/id_rsa" decrypt: yes owner: "{{ perforce_user }}" group: "{{ perforce_group }}" mode: '0600' - name: "Add ssh config lines" blockinfile: path: "/p4/.ssh/config" create: yes owner: "{{ perforce_user }}" group: "{{ perforce_group }}" insertafter: "EOF" block: | PasswordAuthentication no StrictHostKeyChecking no - name: "Ensure authorized_keys exists for perforce user" file: path: "/p4/.ssh/authorized_keys" state: touch owner: "{{ perforce_user }}" group: "{{ perforce_group }}" mode: '0600'