This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_ansible [2023/03/16 07:35] val [Пример 2] |
сервис_ansible [2023/03/21 21:33] val [ansible-pull] |
||
---|---|---|---|
Line 215: | Line 215: | ||
</code><code> | </code><code> | ||
node1# ansible-playbook addusers.yml --syntax-check | node1# ansible-playbook addusers.yml --syntax-check | ||
+ | |||
+ | node1# apt install ansible-lint | ||
+ | node1# ansible-lint addusers.yml | ||
node1# ansible-playbook addusers.yml | node1# ansible-playbook addusers.yml | ||
Line 626: | Line 629: | ||
* [[https://medium.com/splunkuserdeveloperadministrator/using-ansible-pull-in-ansible-projects-ac04466643e8|Using Ansible Pull In Ansible Projects]] | * [[https://medium.com/splunkuserdeveloperadministrator/using-ansible-pull-in-ansible-projects-ac04466643e8|Using Ansible Pull In Ansible Projects]] | ||
* [[Инсталяция системы в конфигурации Desktop]] | * [[Инсталяция системы в конфигурации Desktop]] | ||
+ | * [[Переменные окружения]] | ||
=== Вариант 1 === | === Вариант 1 === | ||
<code> | <code> | ||
- | client2:~/ansible-pull-gpo# cat thunderbird/tasks/main.yml | + | client1:~/ansible-pull-gpo# cat thunderbird/tasks/main.yml |
</code><code> | </code><code> | ||
- name: Install Thunderbird | - name: Install Thunderbird | ||
apt: pkg=thunderbird state=present update_cache=true | apt: pkg=thunderbird state=present update_cache=true | ||
</code><code> | </code><code> | ||
- | client2:~/ansible-pull-gpo# cat proxy/files/etc/environment | + | client1:~/ansible-pull-gpo# cat proxy/files/etc/environment |
</code><code> | </code><code> | ||
- | http_proxy=http://gate.corp13.un:3128 | + | #http_proxy=http://gate.corpX.un:3128 |
- | https_proxy=http://gate.corp13.un:3128 | + | https_proxy=http://gate.corpX.un:3128 |
- | no_proxy=localhost,127.0.0.1,isp.un,corp13.un | + | no_proxy=localhost,127.0.0.1,isp.un,corpX.un |
</code><code> | </code><code> | ||
- | client2:~/ansible-pull-gpo# cat proxy/tasks/main.yml | + | client1:~/ansible-pull-gpo# cat proxy/tasks/main.yml |
</code><code> | </code><code> | ||
- name: Copy file environment | - name: Copy file environment | ||
Line 648: | Line 652: | ||
dest: /etc/environment | dest: /etc/environment | ||
</code><code> | </code><code> | ||
- | client2:~/ansible-pull-gpo# cat local.yml | + | client1:~/ansible-pull-gpo# cat local.yml |
</code><code> | </code><code> | ||
- hosts: localhost | - hosts: localhost | ||
Line 656: | Line 660: | ||
</code> | </code> | ||
- | * [[Инструмент Gitea]] | + | * [[Инструмент GitLab]] (Создать публичный проект без readme и скопировать подсказки) |
<code> | <code> | ||
- | client2:~/ansible-pull-gpo# cat start.sh | + | client3:~# ansible-pull -U http://gate.corp13.un/user1/ansible-pull-gpo.git |
- | </code><code> | + | </code> |
+ | <code> | ||
+ | client1:~/ansible-pull-gpo# cat start.sh | ||
+ | #!/bin/bash | ||
echo -e "0 */2 * * * \ | echo -e "0 */2 * * * \ | ||
- | /usr/bin/ansible-pull -s 90 -U http://gate.corp13.un:3000/student/ansible-pull-gpo.git\n\ | + | /usr/bin/ansible-pull -s 120 -U http://gate.corp13.un/user1/ansible-pull-gpo.git\n\ |
- | @reboot sleep 1m; /usr/bin/ansible-pull -U http://gate.corp13.un:3000/student/ansible-pull-gpo.git" | crontab - | + | @reboot sleep 1m; /usr/bin/ansible-pull -U http://gate.corp13.un/user1/ansible-pull-gpo.git" | crontab - |
</code> | </code> | ||
+ | |||
+ | * Инструмент GitLab [[Инструмент GitLab#Подключение через API]] | ||
=== Вариант 2 === | === Вариант 2 === |