diff --git a/ansible/config_apt.yml b/ansible/config_apt.yml new file mode 100644 index 0000000..a438c2c --- /dev/null +++ b/ansible/config_apt.yml @@ -0,0 +1,22 @@ +- name: config_apt + + - yum: + name: apt + state: present + + - file: + path: /etc/apt/sources.list.d/lcg.list + state: absent + + - lineinfile: + path: /etc/apt/sources.list.d/lcg-ca.list + line: "{{ CA_REPOSITORY }}" + + - lineinfile: + path: /etc/apt/sources.list.d/lcg.list + line: "{{ source }}" + + - debug: + msg: "Running apt-get --assume-yes -f install" + + - shell: apt-get --assume-yes -f install \ No newline at end of file diff --git a/ansible/config_host_certs.yml b/ansible/config_host_certs.yml new file mode 100644 index 0000000..0fbe7d1 --- /dev/null +++ b/ansible/config_host_certs.yml @@ -0,0 +1,17 @@ +- name: config_host_certs + + - file: + path: "{{ X509_HOST_KEY }}" + mode: 400 + failed_when: "yaimlog ERROR "X509_HOST_KEY file in ${X509_HOST_KEY} not found !"" + + - file: + path: "{{ X509_HOST_CERT }}" + mode: 644 + failed_when: "yaimlog ERROR "X509_HOST_CERT file in ${X509_HOST_CERT} not found" + + - openssl_certificate: + path: "{{ X509_HOST_CERT }}" + failed_when: "Hostcert has expired!" + + \ No newline at end of file diff --git a/ansible/config_root_email.yml b/ansible/config_root_email.yml new file mode 100644 index 0000000..5821e02 --- /dev/null +++ b/ansible/config_root_email.yml @@ -0,0 +1,10 @@ +- name: config_root_email + + - file: + path: "{{ ROOT_EMAIL_FORWARD }}" + + - lineinfile: + path: /root/.forward + line: "{{ address }}" + with_items: "{{ ROOT_EMAIL_FORWARD }}" + loop_var: "{{ address }}" \ No newline at end of file diff --git a/ansible/config_vomses.yml b/ansible/config_vomses.yml new file mode 100644 index 0000000..e71ef31 --- /dev/null +++ b/ansible/config_vomses.yml @@ -0,0 +1,33 @@ +- name: config_vomses + - file: + state: absent + path: "{{ INSTALL_ROOT }}/edg/edg/etc/vomses" + + - file: + state: absent + path: "{{ INSTALL_ROOT }}/glite/etc/vomses" + + - file: + state: present + path: /etc/vomses + + - file: + path: /etc/vomses + mode: 0755 + + - block: + - shell: yaimlog ERROR "VOMSES parameter for VO '$vo' has too few fields" + when: "{{ gt }} == """ + + - shell: yaimlog ERROR "VOMSES parameter for VO '$vo' has too few fields" + when: "{{ alias }} == "" or {{ dn }} == """ + with_items: "{{ VOS }}" + + - shell: yaimlog ERROR "VOMSES parameter for VO '$vo' has incorrect DN or alias" + when: "x{{ alias }} != x{{ alias }}/\/" + + - shell: "echo {{ nickname }} {{ server }} {{ port }} {{ dn }} {{ alias }}" + + - file: + path: "{{ filename }}" + mode: 644