ansible/configs/ansible-cicd-lab/jenkins_ssh_setup.yml | ●●●●● patch | view | raw | blame | history | |
ansible/configs/ansible-cicd-lab/post_software.yml | ●●●●● patch | view | raw | blame | history |
ansible/configs/ansible-cicd-lab/jenkins_ssh_setup.yml
New file @@ -0,0 +1,25 @@ --- - name: Retrieve SSH File from Bastion slurp: src: "/root/.ssh/{{ guid }}key.pem" register: bastion_ssh_key no_log: True delegate_to: "{{ bastion_host }}" - name: Create Jenkins SSH Directory file: state: directory path: /var/lib/jenkins/.ssh mode: 700 owner: jenkins group: jenkins - name: Set SSH Key copy: content: "{{ bastion_ssh_key.content | b64decode }}" dest: /var/lib/jenkins/.ssh/id_rsa owner: jenkins group: jenkins mode: 600 no_log: True ansible/configs/ansible-cicd-lab/post_software.yml
@@ -39,6 +39,11 @@ tasks: - name: include docker_setup tasks include_tasks: docker_setup.yml post_tasks: - name: Jenkins SSH Configuration include_tasks: jenkins_ssh_setup.yml vars: bastion_host: "{{ groups['bastions'][0] }}" - hosts: bastions become: false