mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
79 lines
1.6 KiB
YAML
79 lines
1.6 KiB
YAML
---
|
|
|
|
- name: Install packages
|
|
package:
|
|
name:
|
|
- po4a
|
|
- git
|
|
- perl-gettext
|
|
- perl-Pod-Parser
|
|
- perl(YAML::Tiny)
|
|
- perl(Unicode::GCString)
|
|
- python36-PyYAML
|
|
- python-virtualenv
|
|
- python2-pip
|
|
- translate-toolkit
|
|
state: present
|
|
tags:
|
|
- fedora-docs-translation
|
|
when: ansible_distribution_major_version|int < 9
|
|
|
|
- name: Install packages
|
|
package:
|
|
name:
|
|
- po4a
|
|
- git
|
|
- perl-Locale-gettext
|
|
- perl-Pod-Parser
|
|
- perl-YAML-Tiny
|
|
- perl(Unicode::GCString)
|
|
- python3-pyyaml
|
|
- python3-virtualenv
|
|
- python3-pip
|
|
- translate-toolkit
|
|
state: present
|
|
tags:
|
|
- fedora-docs-translation
|
|
when: ansible_distribution_major_version|int >= 9
|
|
|
|
- name: Create a non root user to run the code
|
|
user:
|
|
name: _update_docs_trans
|
|
generate_ssh_key: yes
|
|
ssh_key_file: .ssh/id_rsa_docs_trans
|
|
register: user_result
|
|
tags:
|
|
- fedora-docs-translation
|
|
|
|
- name: Display the public key to add it to pagure
|
|
debug:
|
|
var: user_result.ssh_public_key
|
|
|
|
- copy:
|
|
src: ssh_config
|
|
dest: ~_update_docs_trans/.ssh/config
|
|
owner: _update_docs_trans
|
|
group: _update_docs_trans
|
|
mode: "0644"
|
|
tags:
|
|
- fedora-docs-translation
|
|
|
|
- copy:
|
|
src: docs-translation-update
|
|
dest: /usr/local/bin/docs-translation-update
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
tags:
|
|
- fedora-docs-translation
|
|
|
|
- copy:
|
|
src: cron-docs-translation-update
|
|
dest: /etc/cron.d/cron-docs-translation-update
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
tags:
|
|
- fedora-docs-translation
|
|
when: env == "production" and inventory_hostname.startswith('sundries01')
|