사용자 도구

사이트 도구


linux:apt

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
linux:apt [2025/05/14 13:47]
kwon37xi [apt-key]
linux:apt [2025/05/14 16:57] (현재)
kwon37xi [ansible 의 경우]
줄 119: 줄 119:
 man apt-key 8 man apt-key 8
 </code> </code>
-  * ''apt-key'' 명령은 deprecated 상태라고 보면 된다. 아래와 같은 명령을 사용한다면 후자로 변경해줘야 한다.+  * ''apt-key'' 명령은 **deprecated** 되었으며 [[linux:ubuntu:25.04|Ubuntu 25.04]]에서는 아예 삭제되었다. 아래와 같은 명령을 사용한다면 후자로 변경해줘야 한다.
   * [[devops:ansible|Ansible]] 에서 ''apt-key''도 사용하지 말 것.   * [[devops:ansible|Ansible]] 에서 ''apt-key''도 사용하지 말 것.
  
줄 136: 줄 136:
  
 ==== ansible 의 경우 ==== ==== ansible 의 경우 ====
-  * [[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/deb822_repository_module.html|ansible.builtin.deb822_repository module – Add and remove deb822 formatted repositories — Ansible Community Documentation]] 사용+  * [[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/deb822_repository_module.html|ansible.builtin.deb822_repository module – Add and remove deb822 formatted repositories — Ansible Community Documentation]] 
 +    * Repository 추가와 key 추가를 함께 동시에 한다.
   * [[https://gist.github.com/roib20/27fde10af195cee1c1f8ac5f68be7e9b|Example usages of the new `deb822_repository` Ansible module · GitHub]]   * [[https://gist.github.com/roib20/27fde10af195cee1c1f8ac5f68be7e9b|Example usages of the new `deb822_repository` Ansible module · GitHub]]
  
 <code yaml> <code yaml>
-  tasks: +- name: Add repo using key from URL 
-    - name: Add APT repositories +  deb822_repository: 
-      when: ansible_os_family == 'Debian' +    name: example 
-      become: true +    types: deb 
-      block: +    uris: https://download.example.com/linux/ubuntu 
-        - name: Add VSCode APT repository +    suites: '{{ ansible_distribution_release }}' 
-          ansible.builtin.deb822_repository: +    components: stable 
-            name: vscode +    architectures: amd64 
-            types: [deb] +    signed_by: https://download.example.com/linux/ubuntu/gpg
-            uris: "https://packages.microsoft.com/repos/code" +
-            signed_by: "https://packages.microsoft.com/keys/microsoft.asc" +
-            suites: [stable] +
-            components: [main] +
-            state: present +
-            enabled: yes+
 </code> </code>
 +  * https://gist.github.com/roib20/27fde10af195cee1c1f8ac5f68be7e9b : 각종 deb 패키지 리포지토리 예시
 ===== CheatSheet ===== ===== CheatSheet =====
   * [[http://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html|Debian Linux apt-get package management cheat sheet]]   * [[http://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html|Debian Linux apt-get package management cheat sheet]]
linux/apt.1747198060.txt.gz · 마지막으로 수정됨: 2025/05/14 13:47 저자 kwon37xi