Set become_method in ansible.cfg
This commit is contained in:
parent
2618c1c414
commit
dbdf88fe36
|
@ -2,3 +2,6 @@
|
||||||
nocows = true
|
nocows = true
|
||||||
inventory = inventory.yml
|
inventory = inventory.yml
|
||||||
remote_user = root
|
remote_user = root
|
||||||
|
|
||||||
|
[privilege_escalation]
|
||||||
|
become_method = su
|
||||||
|
|
|
@ -59,7 +59,6 @@
|
||||||
|
|
||||||
- name: Set up authentication
|
- name: Set up authentication
|
||||||
become: yes
|
become: yes
|
||||||
become_method: su
|
|
||||||
become_user: forgejo
|
become_user: forgejo
|
||||||
block:
|
block:
|
||||||
- name: Get passwords
|
- name: Get passwords
|
||||||
|
@ -136,14 +135,12 @@
|
||||||
block:
|
block:
|
||||||
- name: Get runner token
|
- name: Get runner token
|
||||||
become: yes
|
become: yes
|
||||||
become_method: su
|
|
||||||
become_user: forgejo
|
become_user: forgejo
|
||||||
command: forgejo actions generate-runner-token
|
command: forgejo actions generate-runner-token
|
||||||
register: token
|
register: token
|
||||||
|
|
||||||
- name: Register runner
|
- name: Register runner
|
||||||
become: yes
|
become: yes
|
||||||
become_method: su
|
|
||||||
become_user: forgejo-runner
|
become_user: forgejo-runner
|
||||||
become_flags: '-s /bin/sh -l'
|
become_flags: '-s /bin/sh -l'
|
||||||
command: |
|
command: |
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
- name: run migrations
|
- name: run migrations
|
||||||
become: yes
|
become: yes
|
||||||
become_method: su
|
|
||||||
become_user: '{{ user }}'
|
become_user: '{{ user }}'
|
||||||
command: sh ~/app/upgrade.sh
|
command: sh ~/app/upgrade.sh
|
||||||
notify: restart netbox
|
notify: restart netbox
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
become: yes
|
become: yes
|
||||||
become_method: su
|
|
||||||
become_user: '{{ user }}'
|
become_user: '{{ user }}'
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/netbox-community/netbox.git
|
repo: https://github.com/netbox-community/netbox.git
|
||||||
|
@ -83,7 +82,6 @@
|
||||||
|
|
||||||
- name: Set additional requirements
|
- name: Set additional requirements
|
||||||
become: yes
|
become: yes
|
||||||
become_method: su
|
|
||||||
become_user: '{{ user }}'
|
become_user: '{{ user }}'
|
||||||
copy:
|
copy:
|
||||||
dest: '{{ user_info.home }}/app/'
|
dest: '{{ user_info.home }}/app/'
|
||||||
|
@ -94,7 +92,6 @@
|
||||||
|
|
||||||
- name: Create superuser
|
- name: Create superuser
|
||||||
become: yes
|
become: yes
|
||||||
become_method: su
|
|
||||||
become_user: '{{ user }}'
|
become_user: '{{ user }}'
|
||||||
command:
|
command:
|
||||||
cmd: '{{ user_info.home }}/app/venv/bin/python {{ user_info.home }}/app/netbox/manage.py shell --interface python'
|
cmd: '{{ user_info.home }}/app/venv/bin/python {{ user_info.home }}/app/netbox/manage.py shell --interface python'
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
- name: Check for existing database password
|
- name: Check for existing database password
|
||||||
become: yes
|
become: yes
|
||||||
become_user: '{{ user }}'
|
become_user: '{{ user }}'
|
||||||
become_method: su
|
|
||||||
slurp:
|
slurp:
|
||||||
path: '~/.pgpass'
|
path: '~/.pgpass'
|
||||||
register: pgpass
|
register: pgpass
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
- name: Create .pgpass
|
- name: Create .pgpass
|
||||||
become: yes
|
become: yes
|
||||||
become_user: '{{ user }}'
|
become_user: '{{ user }}'
|
||||||
become_method: su
|
|
||||||
copy:
|
copy:
|
||||||
dest: '~/.pgpass'
|
dest: '~/.pgpass'
|
||||||
content: |
|
content: |
|
||||||
|
@ -39,7 +37,6 @@
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
|
||||||
- become: yes
|
- become: yes
|
||||||
become_method: su
|
|
||||||
become_user: postgres
|
become_user: postgres
|
||||||
block:
|
block:
|
||||||
- name: Create database
|
- name: Create database
|
||||||
|
|
Loading…
Reference in a new issue