diff --git a/playbooks/groups/copr-frontend.yml b/playbooks/groups/copr-frontend.yml index 70f4237605..89eaacf13b 100644 --- a/playbooks/groups/copr-frontend.yml +++ b/playbooks/groups/copr-frontend.yml @@ -22,6 +22,8 @@ tasks: - include: "{{ tasks }}/cloud_setup_basic.yml" + - name: set hostname (required by some services, at least postfix need it) + shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" - name: provision instance hosts: copr-front:copr-front-stg diff --git a/playbooks/groups/copr-keygen.yml b/playbooks/groups/copr-keygen.yml index b6fb5312a8..4405171e7a 100644 --- a/playbooks/groups/copr-keygen.yml +++ b/playbooks/groups/copr-keygen.yml @@ -21,6 +21,8 @@ tasks: - include: "{{ tasks }}/cloud_setup_basic.yml" + - name: set hostname (required by some services, at least postfix need it) + shell: "hostname {{copr_hostbase}}.cloud.fedoraproject.org" - name: provision instance #hosts: copr-keygen:copr-keygen-stg diff --git a/roles/copr/base/tasks/main.yml b/roles/copr/base/tasks/main.yml index 065aae2531..7374d097aa 100644 --- a/roles/copr/base/tasks/main.yml +++ b/roles/copr/base/tasks/main.yml @@ -3,14 +3,17 @@ # This is the base set of files needed for copr -- include: "{{ tasks }}/cloud_setup_basic.yml" -- include: "{{ tasks }}/postfix_basic.yml" +# again to late to do it here +# - include: "{{ tasks }}/cloud_setup_basic.yml" +# already included into the `base` role +#- include: "{{ tasks }}/postfix_basic.yml" -- name: setup correct hostname for copr machine - hostname: name="{{ copr_hostbase }}.cloud.fedoraproject.org" - # hostname: name="{{ hostbase|regex_replace('.*-$', '')}}.cloud.fedoraproject.org" - tags: - - config +# To late to do it here ( +#- name: setup correct hostname for copr machine +# hostname: name="{{ copr_hostbase }}.cloud.fedoraproject.org" +# # hostname: name="{{ hostbase|regex_replace('.*-$', '')}}.cloud.fedoraproject.org" +# tags: +# - config - name: copy .forward file copy: src="{{ _forward_src }}" dest="/root/.forward" owner=root group=root @@ -18,6 +21,9 @@ - name: deploy /etc/hosts file copy: src="hosts" dest=/etc/hosts owner=root group=root mode=644 +- name: install copr repo + copy: src="yum/copr.repo" dest="/etc/yum.repos.d/copr.repo" + - name: install common copr packages yum: state=present pkg={{ item }} with_items: @@ -42,6 +48,3 @@ with_items: - fail2ban -- name: install copr repo - copy: src="yum/copr.repo" dest="/etc/yum.repos.d/copr.repo" -